| map.pal | R Documentation | 
Get a color palette for mapping. These palettes were copied from GRASS.
map.pal(name, n=50, ...)
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   | 
| Name | Description | 
| aspect | aspect oriented grey colors | 
| bcyr | blue through cyan through yellow to red | 
| bgyr | blue through green through yellow to red | 
| blues | white to blue | 
| byg | blue through yellow to green | 
| byr | blue through yellow to red | 
| curvature | for terrain curvatures | 
| differences | differences oriented colors | 
| elevation | maps relative ranges of raster values to elevation color ramp | 
| grass | GRASS GIS green (perceptually uniform) | 
| greens | white to green | 
| grey | grey scale | 
| gyr | green through yellow to red | 
| haxby | relative colors for bathymetry or topography | 
| inferno | perceptually uniform sequential colors inferno | 
| magma | perceptually uniform sequential colors | 
| oranges | white to orange | 
| plasma | perceptually uniform sequential colors | 
| rainbow | rainbow colors | 
| ramp | color ramp | 
| random | random colors | 
| reds | white to red | 
| roygbiv | |
| rstcurv | terrain curvature | 
| ryb | red through yellow to blue | 
| ryg | red through yellow to green | 
| sepia | yellowish-brown through to white | 
| viridis | perceptually uniform sequential colors | 
| water | water depth | 
| wave | color wave | 
none
terrain.colors 
map.pal("elevation", 10)
r <- rast(system.file("ex/elev.tif", package="terra"))
plot(r, col=map.pal("elevation"))
map.pal()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.