Skip to content

Commit a8f94c1

Browse files
jfaliphadley
authored andcommitted
Explicit warning about data removal with limits on positional scales (#3421)
Fixes #2887
1 parent 79b16da commit a8f94c1

File tree

6 files changed

+27
-6
lines changed

6 files changed

+27
-6
lines changed

R/scale-.r

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,9 @@
3838
#' Use `NA` to refer to the existing minimum or maximum
3939
#' - A function that accepts the existing (automatic) limits and returns
4040
#' new limits
41+
#'
42+
#' Note that setting limits on positional scales will **remove** data outside of the limits.
43+
#' If the purpose is to zoom, use the limit argument in the coordinate system (see [coord_cartesian()]).
4144
#' @param rescaler A function used to scale the input values to the
4245
#' range \[0, 1]. This is always [scales::rescale()], except for
4346
#' diverging and n colour gradients (i.e., [scale_colour_gradient2()],

man/continuous_scale.Rd

Lines changed: 4 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/scale_continuous.Rd

Lines changed: 4 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/scale_date.Rd

Lines changed: 4 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/scale_gradient.Rd

Lines changed: 4 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/scale_size.Rd

Lines changed: 8 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)