Skip to content

Commit 7cabd35

Browse files
committed
Deprecation of the draw_quantiles parameter coming from geom_violin() parity
1 parent e86ce7f commit 7cabd35

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

R/stat-ydensity.R

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,10 +78,21 @@ StatYdensity <- ggproto("StatYdensity", Stat,
7878
setup_params = function(data, params) {
7979
params$flipped_aes <- has_flipped_aes(data, params, main_is_orthogonal = TRUE, group_has_equal = TRUE)
8080

81+
if (!is.null(params$draw_quantiles)) {
82+
deprecate_soft0(
83+
"3.6.0",
84+
what = "stat_ydensity(draw_quantiles)",
85+
with = "stat_ydensity(quantiles)"
86+
)
87+
params$quantiles <- params$draw_quantiles
88+
check_numeric(params$quantiles, arg = "quantiles")
89+
}
90+
8191
params
8292
},
8393

84-
extra_params = c("na.rm", "orientation"),
94+
# `draw_quantiles` is here for deprecation repair reasons
95+
extra_params = c("na.rm", "orientation", "draw_quantiles"),
8596

8697
compute_group = function(self, data, scales, width = NULL, bw = "nrd0", adjust = 1,
8798
kernel = "gaussian", trim = TRUE, na.rm = FALSE,

0 commit comments

Comments
 (0)