Colours for sea ice.
Usage
ice_pal(x, palette = FALSE, alpha = 1, ..., amsre = FALSE)
icePal(x, palette = FALSE, alpha = 1, ...)Details
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
References
amsre colours derived from 'http://www.iup.uni-bremen.de/seaice/amsr/'., nsidc colours extracted in data-raw/.
Examples
# \donttest{
if (requireNamespace("raster")) {
nsidcfile <- system.file("extdata", "nt_20140320_f17_v01_s.bin",
package = "palr", mustWork = TRUE)
r <- raster::raster(nsidcfile)
icp <- ice_pal(palette = TRUE)
## The AMSR colours
raster::plot(r, col = icp$col, zlim = range(icp$breaks),
main = sprintf("NSIDC ice %s", format(raster::getZ(r))))
}
#> Loading required namespace: raster
# }