Deprecate user-facing size and fatten arguments for ggplot2 4.0 compatibility#430
Open
ishaan-arora-1 wants to merge 2 commits intostan-dev:masterfrom
Open
Deprecate user-facing size and fatten arguments for ggplot2 4.0 compatibility#430ishaan-arora-1 wants to merge 2 commits intostan-dev:masterfrom
ishaan-arora-1 wants to merge 2 commits intostan-dev:masterfrom
Conversation
…dev#408) Complete the remaining tasks from stan-dev#408: - Deprecate `size` in favor of `linewidth` for all plotting functions where `size` controlled line width (density overlays, ribbons, ECDFs, boxplots, violins, error binned, parcoord, acf, KM overlays) - Deprecate `fatten` in `ppc_intervals()`, `ppd_intervals()`, `ppc_loo_intervals()`, `ppc_bars()`, and grouped variants using `lifecycle::deprecated()`. Point size is now controlled directly by `size`, matching ggplot2 4.0 semantics where `fatten` was removed from `geom_pointrange()` - Change default `size` from 1 to 2.5 in interval/bar plots to preserve visual appearance (old `size * fatten = 1 * 2.5`) - Add `lifecycle` as an imported dependency - Update roxygen documentation and examples
- Update tests to use `linewidth` instead of deprecated `size` for line-width-controlling functions (ppc_dens_overlay, ppc_ecdf_overlay, ppc_freqpoly, ppc_boxplot, ppc_km_overlay, ppc_ribbon) - Remove `fatten` from test calls (ppc_bars, ppc_intervals) - Add missing `@param linewidth` documentation in MCMC-diagnostics, MCMC-parcoord, PPC-censoring, and PPC-errors - Delete stale vdiffr snapshots so they regenerate on CI
ishaan-arora-1
added a commit
to ishaan-arora-1/bayesplot
that referenced
this pull request
Mar 10, 2026
This was referenced Mar 10, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #408
Picks up the remaining tasks from #408 as outlined by @jgabry in #408 (comment):
Deprecate user-facing
sizearguments that control line width — added alinewidthparameter across ~25 plotting functions (density overlays, ribbons, ECDFs, boxplots, violins, error binned, parcoord, acf, KM overlays). The oldsizeargument still works but emits a deprecation warning vialifecycle::deprecate_warn().Deprecate
fattenforgeom_pointrange—ppc_intervals(),ppd_intervals(),ppc_loo_intervals(),ppc_bars(), and their grouped variants now usefatten = deprecated(). Point size is controlled directly bysize, matching ggplot2 4.0 semantics. The defaultsizewas changed from 1 to 2.5 to preserve the previous visual appearance (old size * fatten = 1 * 2.5).Added
lifecycleas an imported dependency and created internal helpers (resolve_linewidth(),resolve_fatten()) to keep the deprecation logic consistent. Updated all roxygen docs and examples to use the new parameter names.