|
4 | 4 | #' `ggplot2.continuous.colour` and `ggplot2.continuous.fill` options. If these
|
5 | 5 | #' options are not present, `"gradient"` will be used. See [options()] for more
|
6 | 6 | #' information.
|
7 |
| -#' |
| 7 | +#' |
8 | 8 | #' @param ... Additional parameters passed on to the scale type
|
9 | 9 | #' @param type One of "gradient" (the default) or "viridis" indicating the
|
10 | 10 | #' colour scale to use
|
11 | 11 | #' @seealso [scale_colour_gradient()], [scale_colour_viridis_c()],
|
12 | 12 | #' [scale_fill_gradient()], and [scale_fill_viridis_c()]
|
13 | 13 | #' @export
|
14 | 14 | #' @rdname scale_colour_continuous
|
| 15 | +#' @section Color Blindness: |
| 16 | +#' Many color palettes derived from RGB combinations (like the "rainbow" color |
| 17 | +#' palette) are not suitable to support all viewers, especially those with |
| 18 | +#' color vision deficiencies. Using `viridis` type, which is perceptually |
| 19 | +#' uniform in both colour and black-and-white display is an easy option to |
| 20 | +#' ensure good perceptive properties of your visulizations. |
| 21 | +#' The colorspace package offers functionalities |
| 22 | +#' - to generate color palettes with good perceptive properties, |
| 23 | +#' - to analyse a given color palette, like emulating color blindness, |
| 24 | +#' - and to modify a given color palette for better perceptivity. |
| 25 | +#' |
| 26 | +#' For more information on color vision deficiencies and suitable color choices |
| 27 | +#' see the [paper on the colorspace package](https://arxiv.org/abs/1903.06490) |
| 28 | +#' and references therein. |
15 | 29 | #' @examples
|
16 | 30 | #' v <- ggplot(faithfuld, aes(waiting, eruptions, fill = density)) +
|
17 | 31 | #' geom_tile()
|
18 | 32 | #' v
|
19 |
| -#' |
| 33 | +#' |
20 | 34 | #' v + scale_fill_continuous(type = "gradient")
|
21 | 35 | #' v + scale_fill_continuous(type = "viridis")
|
22 |
| -#' |
| 36 | +#' |
23 | 37 | #' # The above are equivalent to
|
24 | 38 | #' v + scale_fill_gradient()
|
25 | 39 | #' v + scale_fill_viridis_c()
|
|
0 commit comments