diff --git a/R/ggplot2.R b/R/ggplot2.R index 87efcb11b..47cee4dfc 100644 --- a/R/ggplot2.R +++ b/R/ggplot2.R @@ -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, @@ -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,