delim_brewer | R Documentation |
delim_brewer()
returns a set of colors created by interpolating or using
color palettes from RColorBrewer,
viridisLite or randomcoloR.
delim_brewer(delim, package = NULL, palette = NULL, seed = NULL)
delim |
Output from delim_join. |
package |
Package which contains color palettes. Available options are "RColorBrewer", "viridisLite" or "randomcoloR". |
palette |
A palette name. brewer.pal for RColorBrewer or viridis for viridisLite options. |
seed |
Integer. Number to initialize random number generator. |
delim_brewer()
interpolates over a color palette and returns a vector of random colors
whose length is equal to the sum of unique species delimitation partitions in delim
.
For reproducibility, make sure to provide a seed
. If not provided, Sys.time
will be used as seed instead. One should also try different seeds to get best color combinations for plotting.
A character
vector of hexadecimal color codes.
Rupert A. Collins, Pedro S. Bittencourt
# create a vector of colors
cols <- delim_brewer(geophagus_delims, package = "randomcoloR")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.