Skip to content

Commit 23f4c71

Browse files
committed
Hide origin/right arguments that are deprecated
1 parent c7aa7fd commit 23f4c71

File tree

6 files changed

+12
-14
lines changed

6 files changed

+12
-14
lines changed

R/stat-bin.R

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -37,15 +37,12 @@ StatBin <- ggproto(
3737
params
3838
},
3939

40-
extra_params = c("na.rm", "orientation"),
40+
extra_params = c("na.rm", "orientation", "origin", "right"),
4141

4242
compute_group = function(data, scales, binwidth = NULL, bins = NULL,
4343
center = NULL, boundary = NULL,
4444
closed = c("right", "left"), pad = FALSE,
45-
breaks = NULL, flipped_aes = FALSE, drop = "all",
46-
# The following arguments are not used, but must
47-
# be listed so parameters are computed correctly
48-
origin = NULL, right = NULL) {
45+
breaks = NULL, flipped_aes = FALSE, drop = "all") {
4946
x <- flipped_names(flipped_aes)$x
5047
bins <- compute_bins(
5148
data[[x]], scales[[x]],

R/stat-bin2d.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ StatBin2d <- ggproto(
99
required_aes = c("x", "y"),
1010

1111
compute_group = function(data, scales, binwidth = NULL, bins = 30,
12-
breaks = NULL, origin = NULL, drop = TRUE,
12+
breaks = NULL, drop = TRUE,
1313
boundary = NULL, closed = NULL, center = NULL) {
1414

1515
data$z <- data$weight %||% 1

R/stat-summary-2d.R

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,10 @@ StatSummary2d <- ggproto(
2323
params
2424
},
2525

26+
extra_params = c("na.rm", "origin"),
27+
2628
compute_group = function(data, scales, binwidth = NULL, bins = 30,
27-
breaks = NULL, origin = NULL, drop = TRUE,
29+
breaks = NULL, drop = TRUE,
2830
fun = "mean", fun.args = list(),
2931
boundary = 0, closed = NULL, center = NULL) {
3032
bins <- dual_param(bins, list(x = 30, y = 30))
@@ -106,10 +108,7 @@ StatSummary2d <- ggproto(
106108
#' d + stat_summary_hex()
107109
#' d + stat_summary_hex(fun = ~ sum(.x^2))
108110
#' }
109-
stat_summary_2d <- make_constructor(
110-
StatSummary2d, geom = "tile",
111-
omit = c("breaks", "origin")
112-
)
111+
stat_summary_2d <- make_constructor(StatSummary2d, geom = "tile")
113112

114113
#' @export
115114
#' @rdname stat_summary_2d

man/geom_bin_2d.Rd

Lines changed: 0 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/geom_histogram.Rd

Lines changed: 0 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/stat_summary_2d.Rd

Lines changed: 5 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)