Skip to content

Commit 33ca805

Browse files
committed
document palette parameter
1 parent d9d1305 commit 33ca805

File tree

3 files changed

+37
-1
lines changed

3 files changed

+37
-1
lines changed

R/scale-colour.R

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,12 @@
2828
#' [scale_colour_gradient()] or [scale_colour_steps()].
2929
#'
3030
#' @inheritParams continuous_scale
31+
#' @param palette One of the following:
32+
#' * `NULL` for the default palette stored in the theme.
33+
#' * a character vector of colours.
34+
#' * a single string naming a palette.
35+
#' * a palette function that when called with a numeric vector with values
36+
#' between 0 and 1 returns the corresponding output values.
3137
#' @param ... Additional parameters passed on to the scale type
3238
#' @param type One of the following:
3339
#' * "gradient" (the default)
@@ -160,6 +166,12 @@ scale_fill_binned <- function(..., palette = NULL, aesthetics = "fill", guide =
160166
#' unless `type` (which defaults to the `ggplot2.discrete.fill`/`ggplot2.discrete.colour` options)
161167
#' is specified.
162168
#'
169+
#' @param palette One of the following:
170+
#' * `NULL` for the default palette stored in the theme.
171+
#' * a character vector of colours.
172+
#' * a single string naming a palette.
173+
#' * a palette function that when called with a single integer argument (the
174+
#' number of levels in the scale) returns the values that they should take.
163175
#' @param ... Additional parameters passed on to the scale type,
164176
#' @inheritParams discrete_scale
165177
#' @param type One of the following:

man/scale_colour_continuous.Rd

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

man/scale_colour_discrete.Rd

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

0 commit comments

Comments
 (0)