| clim.palette | R Documentation |
Generates a colorblind friendly color palette with color ranges useful in climate temperature variable plotting.
clim.palette(palette = "bluered")
clim.colors(n, palette = "bluered")
palette |
Which type of palette to generate: from blue through white to red ('bluered'), from red through white to blue ('redblue'), from yellow through orange to red ('yellowred'), from red through orange to red ('redyellow'), from purple through white to orange ('purpleorange'), and from orange through white to purple ('orangepurple'). |
n |
Number of colors to generate. |
A function that generates a vector of n color hex codes when
called. The returned function has an optional attribute "na_color"
specifying the color used for missing values.
lims <- seq(-1, 1, length.out = 21)
ColorBar(lims, color_fun = clim.palette('redyellow'))
cols <- clim.colors(20)
ColorBar(lims, cols)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.