View source: R/visualization.R
DiscretePalette | R Documentation |
These are included here because pals depends on a number of compiled packages, and this can lead to increases in run time for Travis, and generally should be avoided when possible.
DiscretePalette(n, palette = NULL, shuffle = FALSE)
n |
Number of colours to be generated. |
palette |
Options are "alphabet", "alphabet2", "glasbey", "polychrome", "stepped", and "parade". Can be omitted and the function will use the one based on the requested n. |
shuffle |
Shuffle the colors in the selected palette. |
These palettes are a much better default for data with many classes than the default ggplot2 palette.
Many thanks to Kevin Wright for writing the pals package.
Taken from the pals package (Licence: GPL-3). https://cran.r-project.org/package=pals Credit: Kevin Wright
A vector of colors
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.