Skip to content

Commit 1c5ec62

Browse files
CateGitaupaleolimbot
authored andcommitted
Improve scale_(x|y)_continuous docs (#3411, fixes #3298)
* added link to scales::squish and scales::squish_infinite in the oob documentation
1 parent cc660da commit 1c5ec62

File tree

6 files changed

+72
-38
lines changed

6 files changed

+72
-38
lines changed

R/scale-.r

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -38,17 +38,21 @@
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()]).
41+
#' Note that setting limits on positional scales will **remove** data outside of the limits.
42+
#' If the purpose is to zoom, use the limit argument in the coordinate system
43+
#' (see [coord_cartesian()]).
4444
#' @param rescaler A function used to scale the input values to the
4545
#' range \[0, 1]. This is always [scales::rescale()], except for
4646
#' diverging and n colour gradients (i.e., [scale_colour_gradient2()],
4747
#' [scale_colour_gradientn()]). The `rescaler` is ignored by position
4848
#' scales, which ways use [scales::rescale()].
49-
#' @param oob Function that handles limits outside of the scale limits
50-
#' (out of bounds). The default ([scales::censor()]) replaces out of
49+
#' @param oob One of:
50+
#' - Function that handles limits outside of the scale limits
51+
#' (out of bounds).
52+
#' - The default ([scales::censor()]) replaces out of
5153
#' bounds values with `NA`.
54+
#' - [scales::squish()] for squishing out of bounds values into range.
55+
#' - [scales::squish_infinite()] for squishing infitite values into range.
5256
#' @param na.value Missing values will be replaced with this value.
5357
#' @param trans For continuous scales, the name of a transformation object
5458
#' or the object itself. Built-in transformations include "asn", "atanh",

man/continuous_scale.Rd

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

man/scale_continuous.Rd

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

man/scale_date.Rd

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

man/scale_gradient.Rd

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

man/scale_size.Rd

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

0 commit comments

Comments
 (0)