View source: R/gg_CreateColors.R
gg_CreateColors | R Documentation |
Function to create a vector of colors based on a color scale.
gg_CreateColors(n, scale = "hue", ..., show = FALSE)
n |
|
scale |
|
... |
|
show |
|
Available color scales (and default parameters) are
"hue" - ...: none (see scales::hue_pal()
)
"brewer" - ...: type="seq", palette=1, direction=1 (see scales::brewer_pal()
)
"viridis" - ...: alpha=1,begin=0,end=0,direction=1,option='D' (see scales::viridis_pal()
)
a vector of colors.
scales::hue_pal()
, scales::brewer_pal()
,scales::viridis_pal()
gg_CreateColors(3,show=TRUE);
gg_CreateColors(3,"brewer",show=TRUE);
gg_CreateColors(3,"viridis",show=TRUE);
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.