powered by
Generates a colorblind friendly color palette with color ranges useful in climate temperature variable plotting.
ClimPalette(palette = "bluered")ClimColors(n, palette = "bluered")
ClimColors(n, palette = "bluered")
ClimPalette() returns the function that generates the color palette and the attribute 'na_color'.
ClimColors() returns a vector of the colors.
A character string of palette. The current choices:
'bluered': from blue through white to red.
'redblue': from red through white to blue.
'yellowred': from yellow through orange to red.
'redyellow': from red through orange to yellow.
'purpleorange': from purple through white to orange.
'orangepurple': from orange through white to purple.
A number indicating how many colors to generate.
lims <- seq(-1, 1, length.out = 21) cb <- ColorBarContinuous(lims, color_fun = ClimPalette('redyellow'), plot = FALSE) cols <- ClimColors(20) cb <- ColorBarContinuous(lims, cols, plot = FALSE)
Run the code above in your browser using DataLab