Skip to content

Commit

Permalink
Adds support of rlang::list2 dynamic dots (#4764)
Browse files Browse the repository at this point in the history
Fixes #4752
  • Loading branch information
mone27 committed Apr 19, 2022
1 parent 00b762d commit 379597d
Show file tree
Hide file tree
Showing 73 changed files with 84 additions and 82 deletions.
2 changes: 2 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# ggplot2 (development version)

* `...` supports `rlang::list2` dynamic dots in all public functions. (@mone27, #4764)

* `theme()` now has a `strip.clip` argument, that can be set to `"off"` to
prevent the clipping of strip text and background borders (@teunbrand, #4118)

Expand Down
2 changes: 1 addition & 1 deletion R/geom-abline.r
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ geom_abline <- function(mapping = NULL, data = NULL,
position = PositionIdentity,
show.legend = show.legend,
inherit.aes = FALSE,
params = list(
params = list2(
na.rm = na.rm,
...
)
Expand Down
2 changes: 1 addition & 1 deletion R/geom-bar.r
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ geom_bar <- function(mapping = NULL, data = NULL,
position = position,
show.legend = show.legend,
inherit.aes = inherit.aes,
params = list(
params = list2(
width = width,
na.rm = na.rm,
orientation = orientation,
Expand Down
2 changes: 1 addition & 1 deletion R/geom-bin2d.r
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ geom_bin_2d <- function(mapping = NULL, data = NULL,
position = position,
show.legend = show.legend,
inherit.aes = inherit.aes,
params = list(
params = list2(
na.rm = na.rm,
...
)
Expand Down
2 changes: 1 addition & 1 deletion R/geom-blank.r
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ geom_blank <- function(mapping = NULL, data = NULL,
position = position,
show.legend = show.legend,
inherit.aes = inherit.aes,
params = list(...),
params = list2(...),
check.aes = FALSE
)
}
Expand Down
2 changes: 1 addition & 1 deletion R/geom-boxplot.r
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ geom_boxplot <- function(mapping = NULL, data = NULL,
position = position,
show.legend = show.legend,
inherit.aes = inherit.aes,
params = list(
params = list2(
outlier.colour = outlier.color %||% outlier.colour,
outlier.fill = outlier.fill,
outlier.shape = outlier.shape,
Expand Down
2 changes: 1 addition & 1 deletion R/geom-col.r
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ geom_col <- function(mapping = NULL, data = NULL,
position = position,
show.legend = show.legend,
inherit.aes = inherit.aes,
params = list(
params = list2(
width = width,
na.rm = na.rm,
...
Expand Down
4 changes: 2 additions & 2 deletions R/geom-contour.r
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ geom_contour <- function(mapping = NULL, data = NULL,
position = position,
show.legend = show.legend,
inherit.aes = inherit.aes,
params = list(
params = list2(
bins = bins,
binwidth = binwidth,
breaks = breaks,
Expand Down Expand Up @@ -125,7 +125,7 @@ geom_contour_filled <- function(mapping = NULL, data = NULL,
position = position,
show.legend = show.legend,
inherit.aes = inherit.aes,
params = list(
params = list2(
bins = bins,
binwidth = binwidth,
breaks = breaks,
Expand Down
2 changes: 1 addition & 1 deletion R/geom-count.r
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ geom_count <- function(mapping = NULL, data = NULL,
position = position,
show.legend = show.legend,
inherit.aes = inherit.aes,
params = list(
params = list2(
na.rm = na.rm,
...
)
Expand Down
2 changes: 1 addition & 1 deletion R/geom-crossbar.r
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ geom_crossbar <- function(mapping = NULL, data = NULL,
position = position,
show.legend = show.legend,
inherit.aes = inherit.aes,
params = list(
params = list2(
fatten = fatten,
na.rm = na.rm,
orientation = orientation,
Expand Down
2 changes: 1 addition & 1 deletion R/geom-curve.r
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ geom_curve <- function(mapping = NULL, data = NULL,
position = position,
show.legend = show.legend,
inherit.aes = inherit.aes,
params = list(
params = list2(
arrow = arrow,
arrow.fill = arrow.fill,
curvature = curvature,
Expand Down
2 changes: 1 addition & 1 deletion R/geom-density.r
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ geom_density <- function(mapping = NULL, data = NULL,
position = position,
show.legend = show.legend,
inherit.aes = inherit.aes,
params = list(
params = list2(
na.rm = na.rm,
orientation = orientation,
outline.type = outline.type,
Expand Down
4 changes: 2 additions & 2 deletions R/geom-density2d.r
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ geom_density_2d <- function(mapping = NULL, data = NULL,
position = position,
show.legend = show.legend,
inherit.aes = inherit.aes,
params = list(
params = list2(
lineend = lineend,
linejoin = linejoin,
linemitre = linemitre,
Expand Down Expand Up @@ -124,7 +124,7 @@ geom_density_2d_filled <- function(mapping = NULL, data = NULL,
position = position,
show.legend = show.legend,
inherit.aes = inherit.aes,
params = list(
params = list2(
na.rm = na.rm,
contour = TRUE,
contour_var = contour_var,
Expand Down
2 changes: 1 addition & 1 deletion R/geom-dotplot.r
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ geom_dotplot <- function(mapping = NULL, data = NULL,
show.legend = show.legend,
inherit.aes = inherit.aes,
# Need to make sure that the binaxis goes to both the stat and the geom
params = list(
params = list2(
binaxis = binaxis,
binwidth = binwidth,
binpositions = binpositions,
Expand Down
2 changes: 1 addition & 1 deletion R/geom-errorbar.r
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ geom_errorbar <- function(mapping = NULL, data = NULL,
position = position,
show.legend = show.legend,
inherit.aes = inherit.aes,
params = list(
params = list2(
na.rm = na.rm,
orientation = orientation,
...
Expand Down
2 changes: 1 addition & 1 deletion R/geom-errorbarh.r
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ geom_errorbarh <- function(mapping = NULL, data = NULL,
position = position,
show.legend = show.legend,
inherit.aes = inherit.aes,
params = list(
params = list2(
na.rm = na.rm,
...
)
Expand Down
2 changes: 1 addition & 1 deletion R/geom-freqpoly.r
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ geom_freqpoly <- function(mapping = NULL, data = NULL,
show.legend = NA,
inherit.aes = TRUE) {

params <- list(na.rm = na.rm, ...)
params <- list2(na.rm = na.rm, ...)
if (identical(stat, "bin")) {
params$pad <- TRUE
}
Expand Down
2 changes: 1 addition & 1 deletion R/geom-function.R
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ geom_function <- function(mapping = NULL, data = NULL, stat = "function",
position = position,
show.legend = show.legend,
inherit.aes = inherit.aes,
params = list(
params = list2(
na.rm = na.rm,
...
)
Expand Down
2 changes: 1 addition & 1 deletion R/geom-hex.r
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ geom_hex <- function(mapping = NULL, data = NULL,
position = position,
show.legend = show.legend,
inherit.aes = inherit.aes,
params = list(
params = list2(
na.rm = na.rm,
...
)
Expand Down
2 changes: 1 addition & 1 deletion R/geom-histogram.r
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ geom_histogram <- function(mapping = NULL, data = NULL,
position = position,
show.legend = show.legend,
inherit.aes = inherit.aes,
params = list(
params = list2(
binwidth = binwidth,
bins = bins,
na.rm = na.rm,
Expand Down
2 changes: 1 addition & 1 deletion R/geom-hline.r
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ geom_hline <- function(mapping = NULL, data = NULL,
position = PositionIdentity,
show.legend = show.legend,
inherit.aes = FALSE,
params = list(
params = list2(
na.rm = na.rm,
...
)
Expand Down
2 changes: 1 addition & 1 deletion R/geom-jitter.r
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ geom_jitter <- function(mapping = NULL, data = NULL,
position = position,
show.legend = show.legend,
inherit.aes = inherit.aes,
params = list(
params = list2(
na.rm = na.rm,
...
)
Expand Down
2 changes: 1 addition & 1 deletion R/geom-label.R
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ geom_label <- function(mapping = NULL, data = NULL,
position = position,
show.legend = show.legend,
inherit.aes = inherit.aes,
params = list(
params = list2(
parse = parse,
label.padding = label.padding,
label.r = label.r,
Expand Down
2 changes: 1 addition & 1 deletion R/geom-linerange.r
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ geom_linerange <- function(mapping = NULL, data = NULL,
position = position,
show.legend = show.legend,
inherit.aes = inherit.aes,
params = list(
params = list2(
na.rm = na.rm,
orientation = orientation,
...
Expand Down
2 changes: 1 addition & 1 deletion R/geom-map.r
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ geom_map <- function(mapping = NULL, data = NULL,
position = PositionIdentity,
show.legend = show.legend,
inherit.aes = inherit.aes,
params = list(
params = list2(
map = map,
na.rm = na.rm,
...
Expand Down
6 changes: 3 additions & 3 deletions R/geom-path.r
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ geom_path <- function(mapping = NULL, data = NULL,
position = position,
show.legend = show.legend,
inherit.aes = inherit.aes,
params = list(
params = list2(
lineend = lineend,
linejoin = linejoin,
linemitre = linemitre,
Expand Down Expand Up @@ -248,7 +248,7 @@ geom_line <- function(mapping = NULL, data = NULL, stat = "identity",
position = position,
show.legend = show.legend,
inherit.aes = inherit.aes,
params = list(
params = list2(
na.rm = na.rm,
orientation = orientation,
...
Expand Down Expand Up @@ -293,7 +293,7 @@ geom_step <- function(mapping = NULL, data = NULL, stat = "identity",
position = position,
show.legend = show.legend,
inherit.aes = inherit.aes,
params = list(
params = list2(
direction = direction,
na.rm = na.rm,
...
Expand Down
2 changes: 1 addition & 1 deletion R/geom-point.r
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ geom_point <- function(mapping = NULL, data = NULL,
position = position,
show.legend = show.legend,
inherit.aes = inherit.aes,
params = list(
params = list2(
na.rm = na.rm,
...
)
Expand Down
2 changes: 1 addition & 1 deletion R/geom-pointrange.r
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ geom_pointrange <- function(mapping = NULL, data = NULL,
position = position,
show.legend = show.legend,
inherit.aes = inherit.aes,
params = list(
params = list2(
fatten = fatten,
na.rm = na.rm,
orientation = orientation,
Expand Down
2 changes: 1 addition & 1 deletion R/geom-polygon.r
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ geom_polygon <- function(mapping = NULL, data = NULL,
position = position,
show.legend = show.legend,
inherit.aes = inherit.aes,
params = list(
params = list2(
na.rm = na.rm,
rule = rule,
...
Expand Down
2 changes: 1 addition & 1 deletion R/geom-quantile.r
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ geom_quantile <- function(mapping = NULL, data = NULL,
position = position,
show.legend = show.legend,
inherit.aes = inherit.aes,
params = list(
params = list2(
lineend = lineend,
linejoin = linejoin,
linemitre = linemitre,
Expand Down
2 changes: 1 addition & 1 deletion R/geom-raster.r
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ geom_raster <- function(mapping = NULL, data = NULL,
position = position,
show.legend = show.legend,
inherit.aes = inherit.aes,
params = list(
params = list2(
hjust = hjust,
vjust = vjust,
interpolate = interpolate,
Expand Down
2 changes: 1 addition & 1 deletion R/geom-rect.r
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ geom_rect <- function(mapping = NULL, data = NULL,
position = position,
show.legend = show.legend,
inherit.aes = inherit.aes,
params = list(
params = list2(
linejoin = linejoin,
na.rm = na.rm,
...
Expand Down
4 changes: 2 additions & 2 deletions R/geom-ribbon.r
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ geom_ribbon <- function(mapping = NULL, data = NULL,
position = position,
show.legend = show.legend,
inherit.aes = inherit.aes,
params = list(
params = list2(
na.rm = na.rm,
orientation = orientation,
outline.type = outline.type,
Expand Down Expand Up @@ -214,7 +214,7 @@ geom_area <- function(mapping = NULL, data = NULL, stat = "identity",
position = position,
show.legend = show.legend,
inherit.aes = inherit.aes,
params = list(
params = list2(
na.rm = na.rm,
orientation = orientation,
outline.type = outline.type,
Expand Down
2 changes: 1 addition & 1 deletion R/geom-rug.r
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ geom_rug <- function(mapping = NULL, data = NULL,
position = position,
show.legend = show.legend,
inherit.aes = inherit.aes,
params = list(
params = list2(
outside = outside,
sides = sides,
length = length,
Expand Down
2 changes: 1 addition & 1 deletion R/geom-segment.r
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ geom_segment <- function(mapping = NULL, data = NULL,
position = position,
show.legend = show.legend,
inherit.aes = inherit.aes,
params = list(
params = list2(
arrow = arrow,
arrow.fill = arrow.fill,
lineend = lineend,
Expand Down
6 changes: 3 additions & 3 deletions R/geom-sf.R
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ geom_sf <- function(mapping = aes(), data = NULL, stat = "sf",
position = position,
show.legend = show.legend,
inherit.aes = inherit.aes,
params = list(
params = list2(
na.rm = na.rm,
...
)
Expand Down Expand Up @@ -273,7 +273,7 @@ geom_sf_label <- function(mapping = aes(), data = NULL,
position = position,
show.legend = show.legend,
inherit.aes = inherit.aes,
params = list(
params = list2(
parse = parse,
label.padding = label.padding,
label.r = label.r,
Expand Down Expand Up @@ -317,7 +317,7 @@ geom_sf_text <- function(mapping = aes(), data = NULL,
position = position,
show.legend = show.legend,
inherit.aes = inherit.aes,
params = list(
params = list2(
parse = parse,
check_overlap = check_overlap,
na.rm = na.rm,
Expand Down
2 changes: 1 addition & 1 deletion R/geom-smooth.r
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ geom_smooth <- function(mapping = NULL, data = NULL,
show.legend = NA,
inherit.aes = TRUE) {

params <- list(
params <- list2(
na.rm = na.rm,
orientation = orientation,
se = se,
Expand Down

0 comments on commit 379597d

Please sign in to comment.