Learn R Programming

palr (version 0.5.0)

dirty_pal: Bathymetry palette, absolute for global use

Description

From AAD underway facility (DiRT).

Usage

dirty_pal(x, palette = FALSE, alpha = 1)

Value

colours, palette, or function, see Details

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

0 to 1 for transparency

Details

The palette functions operate in 3 modes: 1) n colours - Pal(6) - returns 6 colours from the palette 2) data - Pal(c(-4000, -2000, 100)) - return colours for 3 elevations 3) palette - Pal(palette = TRUE) - return the full palette and breaks

The palette spans -8000 to 1000 metres, values outside that range clamp to the end colours.

Examples

Run this code
dirty_pal(seq(-8000, 0, length.out = 10))

Run the code above in your browser using DataLab