powered by
Uses the function grDevices::palette.colors() to generate discrete color palettes using the following rules:
grDevices::palette.colors()
n <= 9: "Okabe-Ito".
n <= 9
n == 10: "Tableau 10"
n == 10
n > 10 && n <= 12: "Paired"
n > 10 && n <= 12
n > 12 && n <= 26: "Alphabet"
n > 12 && n <= 26
n > 26 && n <= 36: "Polychrome 36"
n > 26 && n <= 36
color_discrete(n = NULL, rev = FALSE)
color vector
(required, integer) number of colors to generate. Default = NULL
(optional, logical) If TRUE, the color palette is reversed. Default: FALSE
Other internal_plotting: color_continuous(), utils_color_breaks(), utils_line_color(), utils_line_guide(), utils_matrix_guide(), utils_matrix_plot()
color_continuous()
utils_color_breaks()
utils_line_color()
utils_line_guide()
utils_matrix_guide()
utils_matrix_plot()
color_discrete(n = 9)
Run the code above in your browser using DataLab