Skip to content

Commit 419fb2e

Browse files
committed
deprecate fatten
1 parent ebecea5 commit 419fb2e

File tree

3 files changed

+26
-2
lines changed

3 files changed

+26
-2
lines changed

R/geom-boxplot.R

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -241,6 +241,15 @@ GeomBoxplot <- ggproto("GeomBoxplot", Geom,
241241
extra_params = c("na.rm", "width", "orientation", "outliers"),
242242

243243
setup_params = function(data, params) {
244+
if (lifecycle::is_present(params$fatten)) {
245+
deprecate_soft0(
246+
"3.6.0", "geom_boxplot(fatten)",
247+
"geom_boxplot(median.linewidth)"
248+
)
249+
} else {
250+
# For backward compatibility reasons
251+
params$fatten <- 2
252+
}
244253
params$flipped_aes <- has_flipped_aes(data, params)
245254
params
246255
},

R/geom-crossbar.R

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ geom_crossbar <- function(mapping = NULL, data = NULL,
1717
box.color = NULL,
1818
box.linetype = NULL,
1919
box.linewidth = NULL,
20-
fatten = 2.5,
20+
fatten = deprecated(),
2121
na.rm = FALSE,
2222
orientation = NA,
2323
show.legend = NA,
@@ -60,6 +60,15 @@ geom_crossbar <- function(mapping = NULL, data = NULL,
6060
#' @export
6161
GeomCrossbar <- ggproto("GeomCrossbar", Geom,
6262
setup_params = function(data, params) {
63+
if (lifecycle::is_present(params$fatten)) {
64+
deprecate_soft0(
65+
"3.6.0", "geom_crossbar(fatten)",
66+
"geom_crossbar(middle.linewidth)"
67+
)
68+
} else {
69+
# For backward compatibility reasons
70+
params$fatten <- 2.5
71+
}
6372
GeomErrorbar$setup_params(data, params)
6473
},
6574

R/geom-pointrange.R

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
geom_pointrange <- function(mapping = NULL, data = NULL,
44
stat = "identity", position = "identity",
55
...,
6-
fatten = 4,
6+
fatten = deprecated(),
77
na.rm = FALSE,
88
orientation = NA,
99
show.legend = NA,
@@ -42,6 +42,12 @@ GeomPointrange <- ggproto("GeomPointrange", Geom,
4242
required_aes = c("x", "y", "ymin|xmin", "ymax|xmax"),
4343

4444
setup_params = function(data, params) {
45+
if (lifecycle::is_present(params$fatten)) {
46+
deprecate_soft0("3.6.0", "geom_pointrange(fatten)", I("the `size` aesthetic"))
47+
} else {
48+
# For backward compatibility reasons
49+
params$fatten <- 4
50+
}
4551
GeomLinerange$setup_params(data, params)
4652
},
4753

0 commit comments

Comments
 (0)