ice_pal: Sea ice colours

Description Usage Arguments Details Value References Examples

View source: R/palr.R

Description

Colours for sea ice.

Usage

1
2
3
ice_pal(x, palette = FALSE, alpha = 1, ...)

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

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

Derived from http://www.iup.uni-bremen.de/seaice/amsr/.

Examples

1
2
3
4
5
6
7
8
9
## 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 May 5, 2021, 9:05 a.m.