View source: R/color_discrete.R
color_discrete | R Documentation |
Uses the function grDevices::palette.colors()
to generate discrete color palettes using the following rules:
n <= 9
: "Okabe-Ito".
n == 10
: "Tableau 10"
n > 10 && n <= 12
: "Paired"
n > 12 && n <= 26
: "Alphabet"
n > 26 && n <= 36
: "Polychrome 36"
color_discrete(n = NULL, rev = FALSE)
n |
(required, integer) number of colors to generate. Default = NULL |
rev |
(optional, logical) If TRUE, the color palette is reversed. Default: FALSE |
color vector
Other internal_plotting:
color_continuous()
,
utils_color_breaks()
,
utils_line_color()
,
utils_line_guide()
,
utils_matrix_guide()
,
utils_matrix_plot()
color_discrete(n = 9)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.