|
27 | 27 | #' * a palette function that when called with a numeric vector with values
|
28 | 28 | #' between 0 and 1 returns the corresponding output values.
|
29 | 29 | #' @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")`. |
34 | 33 | #' @seealso [scale_colour_gradient()], [scale_colour_viridis_c()],
|
35 | 34 | #' [scale_colour_steps()], [scale_colour_viridis_b()], [scale_fill_gradient()],
|
36 | 35 | #' [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 =
|
177 | 176 | #' @inheritParams discrete_scale
|
178 | 177 | #' @param type `r lifecycle::badge("superseded")` The preferred mechanism for
|
179 | 178 | #' 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")`. |
192 | 180 | #' @export
|
193 | 181 | #' @seealso
|
194 | 182 | #' The `r link_book("discrete colour scales section", "scales-colour#sec-colour-discrete")`
|
|
0 commit comments