diff --git a/R/limits.r b/R/limits.r index ce40f26da9..9d10c619c2 100644 --- a/R/limits.r +++ b/R/limits.r @@ -1,8 +1,10 @@ #' Set scale limits #' -#' This is a shortcut for supplying the `limits` argument to the -#' individual scales. Note that, by default, any values outside the limits -#' will be replaced with `NA`. +#' This is a shortcut for supplying the `limits` argument to the individual +#' scales. By default, any values outside the limits specified are replaced with +#' `NA`. Be warned that this will remove data outside the limits and this can +#' produce unintended results. For changing x or y axis limits \strong{without} +#' dropping data observations, see [coord_cartesian()]. #' #' @param ... For `xlim()` and `ylim()`: Two numeric values, specifying the left/lower #' limit and the right/upper limit of the scale. If the larger value is given first, @@ -17,10 +19,9 @@ #' A character or factor value will create a discrete scale. #' A date-time value will create a continuous date/time scale. #' -#' @seealso For changing x or y axis limits \strong{without} dropping data -#' observations, see [coord_cartesian()]. To expand the range of -#' a plot to always include certain values, see [expand_limits()]. For other -#' types of data, see [scale_x_discrete()], [scale_x_continuous()], [scale_x_date()]. +#' @seealso To expand the range of a plot to always include +#' certain values, see [expand_limits()]. For other types of data, see +#' [scale_x_discrete()], [scale_x_continuous()], [scale_x_date()]. #' #' @export #' @examples diff --git a/man/lims.Rd b/man/lims.Rd index 8d50557ecd..4557cde03e 100644 --- a/man/lims.Rd +++ b/man/lims.Rd @@ -27,9 +27,11 @@ A character or factor value will create a discrete scale. A date-time value will create a continuous date/time scale.} } \description{ -This is a shortcut for supplying the \code{limits} argument to the -individual scales. Note that, by default, any values outside the limits -will be replaced with \code{NA}. +This is a shortcut for supplying the \code{limits} argument to the individual +scales. By default, any values outside the limits specified are replaced with +\code{NA}. Be warned that this will remove data outside the limits and this can +produce unintended results. For changing x or y axis limits \strong{without} +dropping data observations, see \code{\link[=coord_cartesian]{coord_cartesian()}}. } \examples{ # Zoom into a specified area @@ -85,8 +87,7 @@ p + coord_cartesian(xlim =c(Sys.Date() - 30, NA), ylim = c(10, 20)) } \seealso{ -For changing x or y axis limits \strong{without} dropping data -observations, see \code{\link[=coord_cartesian]{coord_cartesian()}}. To expand the range of -a plot to always include certain values, see \code{\link[=expand_limits]{expand_limits()}}. For other -types of data, see \code{\link[=scale_x_discrete]{scale_x_discrete()}}, \code{\link[=scale_x_continuous]{scale_x_continuous()}}, \code{\link[=scale_x_date]{scale_x_date()}}. +To expand the range of a plot to always include +certain values, see \code{\link[=expand_limits]{expand_limits()}}. For other types of data, see +\code{\link[=scale_x_discrete]{scale_x_discrete()}}, \code{\link[=scale_x_continuous]{scale_x_continuous()}}, \code{\link[=scale_x_date]{scale_x_date()}}. }