ice_pal | R Documentation |
Colours for sea ice.
ice_pal(x, palette = FALSE, alpha = 1, ..., amsre = FALSE)
icePal(x, palette = FALSE, alpha = 1, ...)
x |
a vector of data values or a single num (n) |
palette |
logical, if |
alpha |
value in 0,1 to specify opacity |
... |
currently ignored |
amsre |
use old AMSRE colours ('FALSE' by default) |
The palette functions operate in 3 modes: 1) n colours - Pal(6) - returns 6 colours from the palette 2) data - Pal(c(10, 50, 100)) - return colours for 3 ice concentrations 3) palette - Pal(palette = TRUE) - return the full palette and breaks
colours, palette, or function, see Details
amsre colours derived from http://www.iup.uni-bremen.de/seaice/amsr/., nsidc colours extracted in data-raw/.
## Not run:
library(raster)
r <- raster(system.file("extdata", "nt_20140320_f17_v01_s.bin", package = "graticule") )
icp <- ice_pal(palette = TRUE)
## The AMSR colours
plot(r, col = icp$col, zlim = range(icp$breaks),
main = sprintf("NSIDC ice \\% %s", format(getZ(r))))
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.