View source: R/visualizations.R
| tmodPal | R Documentation | 
Return a preset selection of colors, adjusted by alpha
tmodPal(n = NULL, set = "friendly", alpha = 0.7, func = FALSE)
| n | Number of colors to return (default: all for "friendly", 3 for everything else) | 
| set | Which palette set (see Details). | 
| alpha | 0 for maximum transparency, 1 for no transparency. | 
| func | if TRUE, the returned object will be a function rather than a character vector | 
A few palettes have been predefined in tmod, and this function can be used to extract them. The following palettes have been defined: * friendly – a set of distinct, colorblind-friendly colors * bwr, rwb, ckp, pkc – gradients (b-blue, r-red, w-white, c-cyan, k-blacK, p-purple) By default, either all colors are returned, or, if it is a gradient palette, only three.
Either a character vector, or, when the func parameter is TRUE, a function that takes only one argument (a single number)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.