Deprecated ggplot2 arguments
Nobody has claimed this yet.
- Dominant language
- R
- Stars
- 442
- Forks
- 93
- Avg merge
- 3h 11m
- Merged PRs (30d)
- 1
Description
Currently, there are 3 deprecated ggplot2 arguments that appears when running devtools::test():
- The
draw_quantilesargument ofgeom_violin()is deprecated as of ggplot2 4.0.0.
i Please use thequantiles.linetypeargument instead. (Note this deprecation is supposed to sayquantile.linetype, as seen in the documentation https://ggplot2.tidyverse.org/reference/geom_violin.html)
This is only used internally, since the public API for ppc_violin_grouped() uses probs. However, when changing all instances of draw_quantiles to quantile.linetype, a test in test-ppc-distributions.R at line 334/335 fails:
> ppc_violin_grouped(vdiff_y, vdiff_yrep, vdiff_group)
Error:
! Problem while converting geom to grob.
ℹ Error occurred in the 1st layer.
Caused by error in `draw_panel()`:
! `geom_path()` can't have varying colour, linewidth, and/or alpha along the line when linetype isn't solid.
Run `rlang::last_trace()` to see where the error occurred.
ppc_intervals()/ppd_intervals()use deprecated ggplot2 arguments (fatten,size).
The fatten argument of geom_pointrange() is deprecated as of ggplot2 4.0.0.
i Please use the size aesthetic instead.
Using size aesthetic for lines was deprecated in ggplot2 3.4.0.
i Please use linewidth instead.
Changing the public API would be breaking. Furthermore, replacing fatten with size would mean the new size would semantically correspond to the old fatten, not the existing size.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the internal geom_violin() usage and the ppc_intervals()/ppd_intervals() implementations, then inspect test-ppc-distributions.R around lines 334/335. Run devtools::test() to reproduce the ggplot2 deprecation messages and the ppc_violin_grouped() failure. Done means the deprecated arguments are addressed without breaking the public API, and the affected tests pass.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- r
- Domain
- data-visualization
- Issue type
- Refactor
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100