Skip to content

add warning in lims docs about values outside of limits being removed from data #3789

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Mar 5, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 8 additions & 7 deletions R/limits.r
Original file line number Diff line number Diff line change
@@ -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,
Expand All @@ -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
Expand Down
15 changes: 8 additions & 7 deletions man/lims.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.