From 081f76818fbaa359976ca7e0213348e22b6fcafa Mon Sep 17 00:00:00 2001 From: Teun van den Brand Date: Fri, 2 Feb 2024 15:14:10 +0100 Subject: [PATCH] Clarify that limits are given after expansion --- R/scale-.R | 1 + man/binned_scale.Rd | 1 + man/continuous_scale.Rd | 1 + man/scale_binned.Rd | 1 + man/scale_continuous.Rd | 1 + man/scale_gradient.Rd | 1 + man/scale_linewidth.Rd | 1 + man/scale_size.Rd | 1 + man/scale_steps.Rd | 1 + 9 files changed, 9 insertions(+) diff --git a/R/scale-.R b/R/scale-.R index d4776ca5ea..c85c905eab 100644 --- a/R/scale-.R +++ b/R/scale-.R @@ -19,6 +19,7 @@ #' - A numeric vector of positions #' - A function that takes the limits as input and returns breaks #' as output (e.g., a function returned by [scales::extended_breaks()]). +#' Note that for position scales, limits are provided after scale expansion. #' Also accepts rlang [lambda][rlang::as_function()] function notation. #' @param minor_breaks One of: #' - `NULL` for no minor breaks diff --git a/man/binned_scale.Rd b/man/binned_scale.Rd index b03ae8201b..8d29c1941b 100644 --- a/man/binned_scale.Rd +++ b/man/binned_scale.Rd @@ -51,6 +51,7 @@ omitted.} \item A numeric vector of positions \item A function that takes the limits as input and returns breaks as output (e.g., a function returned by \code{\link[scales:breaks_extended]{scales::extended_breaks()}}). +Note that for position scales, limits are provided after scale expansion. Also accepts rlang \link[rlang:as_function]{lambda} function notation. }} diff --git a/man/continuous_scale.Rd b/man/continuous_scale.Rd index 11e3d64ed9..75e3a9b427 100644 --- a/man/continuous_scale.Rd +++ b/man/continuous_scale.Rd @@ -49,6 +49,7 @@ omitted.} \item A numeric vector of positions \item A function that takes the limits as input and returns breaks as output (e.g., a function returned by \code{\link[scales:breaks_extended]{scales::extended_breaks()}}). +Note that for position scales, limits are provided after scale expansion. Also accepts rlang \link[rlang:as_function]{lambda} function notation. }} diff --git a/man/scale_binned.Rd b/man/scale_binned.Rd index 1d9bf4bc58..f6941dd2e0 100644 --- a/man/scale_binned.Rd +++ b/man/scale_binned.Rd @@ -64,6 +64,7 @@ breaks are given explicitly.} \item A numeric vector of positions \item A function that takes the limits as input and returns breaks as output (e.g., a function returned by \code{\link[scales:breaks_extended]{scales::extended_breaks()}}). +Note that for position scales, limits are provided after scale expansion. Also accepts rlang \link[rlang:as_function]{lambda} function notation. }} diff --git a/man/scale_continuous.Rd b/man/scale_continuous.Rd index 576e463abb..7fbc970c4e 100644 --- a/man/scale_continuous.Rd +++ b/man/scale_continuous.Rd @@ -71,6 +71,7 @@ omitted.} \item A numeric vector of positions \item A function that takes the limits as input and returns breaks as output (e.g., a function returned by \code{\link[scales:breaks_extended]{scales::extended_breaks()}}). +Note that for position scales, limits are provided after scale expansion. Also accepts rlang \link[rlang:as_function]{lambda} function notation. }} diff --git a/man/scale_gradient.Rd b/man/scale_gradient.Rd index ed305e11a3..36c64abdac 100644 --- a/man/scale_gradient.Rd +++ b/man/scale_gradient.Rd @@ -114,6 +114,7 @@ values between 0 and 1 returns the corresponding output values \item A numeric vector of positions \item A function that takes the limits as input and returns breaks as output (e.g., a function returned by \code{\link[scales:breaks_extended]{scales::extended_breaks()}}). +Note that for position scales, limits are provided after scale expansion. Also accepts rlang \link[rlang:as_function]{lambda} function notation. }} \item{\code{minor_breaks}}{One of: diff --git a/man/scale_linewidth.Rd b/man/scale_linewidth.Rd index 68cd760927..54f6d3b13a 100644 --- a/man/scale_linewidth.Rd +++ b/man/scale_linewidth.Rd @@ -48,6 +48,7 @@ omitted.} \item A numeric vector of positions \item A function that takes the limits as input and returns breaks as output (e.g., a function returned by \code{\link[scales:breaks_extended]{scales::extended_breaks()}}). +Note that for position scales, limits are provided after scale expansion. Also accepts rlang \link[rlang:as_function]{lambda} function notation. }} diff --git a/man/scale_size.Rd b/man/scale_size.Rd index 6e941cee46..d25f43ff78 100644 --- a/man/scale_size.Rd +++ b/man/scale_size.Rd @@ -66,6 +66,7 @@ omitted.} \item A numeric vector of positions \item A function that takes the limits as input and returns breaks as output (e.g., a function returned by \code{\link[scales:breaks_extended]{scales::extended_breaks()}}). +Note that for position scales, limits are provided after scale expansion. Also accepts rlang \link[rlang:as_function]{lambda} function notation. }} diff --git a/man/scale_steps.Rd b/man/scale_steps.Rd index 97ee769de7..cf009a600d 100644 --- a/man/scale_steps.Rd +++ b/man/scale_steps.Rd @@ -116,6 +116,7 @@ the left (open on the right).} \item A numeric vector of positions \item A function that takes the limits as input and returns breaks as output (e.g., a function returned by \code{\link[scales:breaks_extended]{scales::extended_breaks()}}). +Note that for position scales, limits are provided after scale expansion. Also accepts rlang \link[rlang:as_function]{lambda} function notation. }} \item{\code{labels}}{One of: