Learn R Programming

terra (version 1.7-55)

map.pal: map.pal arrow

Description

Get a color palette for mapping. These palettes were copied from GRASS.

Usage

map.pal(name, n=50, ...)

Value

none

Arguments

name

character (name of a palette, see Details), or missing (to get the available names)

n

numeric. The number of colors

...

additional arguments that are passed to colorRamp

Details

NameDescription
aspectaspect oriented grey colors
bcyrblue through cyan through yellow to red
bgyrblue through green through yellow to red
blueswhite to blue
bygblue through yellow to green
byrblue through yellow to red
curvaturefor terrain curvatures
differencesdifferences oriented colors
elevationmaps relative ranges of raster values to elevation color ramp
grassGRASS GIS green (perceptually uniform)
greenswhite to green
greygrey scale
grey.eqhistogram-equalized grey scale
grey.loghistogram logarithmic transformed grey scale
gyrgreen through yellow to red
haxbyrelative colors for bathymetry or topography
infernoperceptually uniform sequential color table inferno
magmaperceptually uniform sequential color table magma
orangeswhite to orange
plasmaperceptually uniform sequential color table plasma
rainbowrainbow color table
rampcolor ramp
randomrandom color table
redswhite to red
roygbiv
rstcurvterrain curvature
rybred through yellow to blue
rygred through yellow to green
sepiayellowish-brown through to white
viridisperceptually uniform sequential color table viridis
waterwater depth
wavecolor wave

See Also

Examples

Run this code
map.pal("elevation", 10)

r <- rast(system.file("ex/elev.tif", package="terra"))
plot(r, col=map.pal("elevation"))

map.pal()

Run the code above in your browser using DataLab