Skip to content

Commit fbee0d6

Browse files
committed
dedocument type options
1 parent 6a447ba commit fbee0d6

File tree

3 files changed

+8
-36
lines changed

3 files changed

+8
-36
lines changed

R/scale-colour.R

Lines changed: 4 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,9 @@
2727
#' * a palette function that when called with a numeric vector with values
2828
#' between 0 and 1 returns the corresponding output values.
2929
#' @param ... Additional parameters passed on to the scale type
30-
#' @param type `r lifecycle::badge("superseded")` One of the following:
31-
#' * "gradient" (the default)
32-
#' * "viridis"
33-
#' * A function that returns a continuous colour scale.
30+
#' @param type `r lifecycle::badge("superseded")` The preferred mechanism for
31+
#' setting the default palette is by using the theme. For example:
32+
#' `theme(palette.colour.discrete = "viridis")`.
3433
#' @seealso [scale_colour_gradient()], [scale_colour_viridis_c()],
3534
#' [scale_colour_steps()], [scale_colour_viridis_b()], [scale_fill_gradient()],
3635
#' [scale_fill_viridis_c()], [scale_fill_steps()], and [scale_fill_viridis_b()]
@@ -177,18 +176,7 @@ scale_fill_binned <- function(..., palette = NULL, aesthetics = "fill", guide =
177176
#' @inheritParams discrete_scale
178177
#' @param type `r lifecycle::badge("superseded")` The preferred mechanism for
179178
#' setting the default palette is by using the theme. For example:
180-
#' `theme(palette.colour.discrete = "Okabe-Ito")`. One of the following:
181-
#' * A character vector of color codes. The codes are used for a 'manual' color
182-
#' scale as long as the number of codes exceeds the number of data levels
183-
#' (if there are more levels than codes, [scale_colour_hue()]/[scale_fill_hue()]
184-
#' are used to construct the default scale). If this is a named vector, then the color values
185-
#' will be matched to levels based on the names of the vectors. Data values that
186-
#' don't match will be set as `na.value`.
187-
#' * A list of character vectors of color codes. The minimum length vector that exceeds the
188-
#' number of data levels is chosen for the color scaling. This is useful if you
189-
#' want to change the color palette based on the number of levels.
190-
#' * A function that returns a discrete colour/fill scale (e.g., [scale_fill_hue()],
191-
#' [scale_fill_brewer()], etc).
179+
#' `theme(palette.colour.discrete = "Okabe-Ito")`.
192180
#' @export
193181
#' @seealso
194182
#' The `r link_book("discrete colour scales section", "scales-colour#sec-colour-discrete")`

man/scale_colour_continuous.Rd

Lines changed: 3 additions & 6 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: 1 addition & 14 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)