| chl_pal | R Documentation |
Ocean colour palette for chlorophyll-a.
chl_pal(x, palette = FALSE, alpha = 1)
chlPal(x, palette = FALSE, alpha = 1, ...)
x |
a vector of data values or a single number |
palette |
logical, if |
alpha |
value in 0,1 to specify opacity |
... |
currently unused |
Flexible control of the chlorophyll-a palette. If x is a
single number, the function returns that many colours evenly
spaced from the palette. If x is a vector of multiple
values the palette is queried for colours matching those values,
and these are returned. If x is missing and palette
is FALSE then a function is returned that will generate n
evenly spaced colours from the palette, as per
colorRampPalette.
colours, palette, or function, see Details
Derived from a file once found at 'http://oceancolor.gsfc.nasa.gov/DOCS/palette_chl_etc.txt'
## just get a small number of evenly space colours
plot(1:10, col = chl_pal(10))
## store the full palette and work with values and colours
pal <- chl_pal(palette = TRUE)
## the standard full palette
image(chl, breaks = pal$breaks, col = pal$cols[-1])
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.