ice_pal: Sea ice colours

View source: R/palr.R

ice_palR Documentation

Sea ice colours

Description

Colours for sea ice.

Usage

ice_pal(x, palette = FALSE, alpha = 1, ..., amsre = FALSE)

icePal(x, palette = FALSE, alpha = 1, ...)

Arguments

x

a vector of data values or a single num (n)

palette

logical, if TRUE return a list with matching colours and values

alpha

value in 0,1 to specify opacity

...

currently ignored

amsre

use old AMSRE colours ('FALSE' by default)

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

Value

colours, palette, or function, see Details

References

amsre colours derived from http://www.iup.uni-bremen.de/seaice/amsr/., nsidc colours extracted in data-raw/.

Examples

## 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)

palr documentation built on Nov. 6, 2023, 9:06 a.m.