ggplot2 icon indicating copy to clipboard operation
ggplot2 copied to clipboard

geom_violin(): draw_quantiles deprecation message is incomplete and has a typo

Open twest822 opened this issue 1 month ago • 1 comments

Repex for this is actually in the docs, which include an example of the deprecation warning.

geom_violin(..., draw_quantiles = c(0.25, 0.5, 0.75))
Warning message:
The `draw_quantiles` argument of `geom_violin()` is deprecated as of ggplot2 4.0.0.
ℹ Please use the `quantiles.linetype` argument instead.

Looks like the warning should probably read

ℹ Please use the `quantiles` argument with the `quantile.linetype` argument instead.

for clarity as the replacing syntax is apparently

geom_violin(..., quantiles = c(0.25, 0.5, 0.75), quantile.linetype = "solid")

and there is no quantiles.linetype argument.

Some confusion over needing to move quantile.linetype off its default as well as rename draw_quantiles to quantiles seems likely, so likely it'd be good to update the docs to show an example of the new syntax in addition to draw_quantiles' deprecation.

twest822 avatar Nov 25 '25 16:11 twest822

It is a bit messy because geom_violin(stat = *not a violin stat*) may not have the quantiles parameter. The typo should be fixed though.

teunbrand avatar Nov 25 '25 19:11 teunbrand