getMultipleColors | R Documentation |
See details: https://cran.r-project.org/web/packages/viridis/vignettes/intro-to-viridis.html
getMultipleColors( types, alpha = 1, b = 0, e = 1, direction = 1, pal = viridis, showColor = FALSE )
types |
vector/array, which we want to assign each element with a distinct color |
alpha |
numeric, default is 1 |
b |
numeric, 0,1 color begin value, default is 0 |
e |
numeric, 0,1 color end value, default is 1 , no less than b NOTE, both b and e are calculated from the right-side in the color scales. |
direction |
1 or -1, default is 1 If 1, colors are ordered from darkest to lightest. If -1, the order of colors is reversed. |
pal |
literal, color palette to use, default is viridis (no "" needed) |
showColor |
bool, after generating the color if need to show colors with scales::show_col, default FALSE |
vector of characters with types as names. Each element represents one color.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.