Skip to content

Commit

Permalink
specify argument names in ggplot2 call (name existed before 3.5.0, so…
Browse files Browse the repository at this point in the history
… no need to depend on ggplot2 3.5.0) (no need to specify `scale_name`?
  • Loading branch information
olivroy committed Jun 28, 2024
1 parent c8d22d8 commit b542e4e
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions R/ggplot2.R
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,13 @@ scale_x_num <- function(..., position = "bottom", guide = ggplot2::waiver(),
rescaler = NULL, super = NULL) {
stopifnot(is.null(rescaler))
stopifnot(is.null(super))
stopifnot(is_installed("ggplot2"))
check_installed("ggplot2")
ggplot2::continuous_scale(
c(
aesthetics = c(
"x", "xmin", "xmax", "xend", "xintercept", "xmin_final", "xmax_final",
"xlower", "xmiddle", "xupper"
),
"position_c", identity,
palette = "position_c",
...,
guide = guide,
position = position,
Expand All @@ -36,13 +36,13 @@ scale_y_num <- function(..., guide = ggplot2::waiver(),
rescaler = NULL, super = NULL) {
stopifnot(is.null(rescaler))
stopifnot(is.null(super))
stopifnot(is_installed("ggplot2"))
check_installed("ggplot2")
ggplot2::continuous_scale(
c(
aesthetics = c(
"y", "ymin", "ymax", "yend", "yintercept", "ymin_final", "ymax_final",
"lower", "middle", "upper"
),
"position_c", identity,
palette = "position_c",
...,
guide = guide,
rescaler = scales::rescale,
Expand Down

0 comments on commit b542e4e

Please sign in to comment.