Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

display.pal

Display a color palette


Description

Plots a color palette in a new window.

Usage

display.pal(pal, sel=1:length(pal), names=FALSE)

Arguments

pal

list; each palette a vector of HEX-formated colors

sel

integer; selection of palettes to plot

names

logical; specifies whether to print also the class names

Details

The internal palettes available in plotKML typically consists of 20 elements. If class names are requrested (names=TRUE) than only one palette will be plotted.

Author(s)

Tomislav Hengl and Pierre Roudier

See Also

Examples

# SAGA GIS palette (http://saga-gis.org/en/about/software.html)
data(SAGA_pal)
names(SAGA_pal)
## Not run: # display palettes:
display.pal(pal=SAGA_pal, sel=c(1,2,7,8,10,11,17,18,19,21,22))
dev.off()
data(worldgrids_pal)
worldgrids_pal[["globcov"]]
display.pal(pal=worldgrids_pal, sel=c(5), names = TRUE)
dev.off()
# make icons (http://www.statmethods.net/advgraphs/parameters.html):
for(i in 0:25){
  png(filename=paste("icon", i, ".png", sep=""), width=45, height=45, 
  bg="transparent", pointsize=16)
  par(mar=c(0,0,0,0))
  plot(x=1, y=1, axes=FALSE, xlab='', ylab='', pch=i, cex=4, lwd=2)
  dev.off()
}

## End(Not run)

plotKML

Visualization of Spatial and Spatio-Temporal Objects in Google Earth

v0.8-1
GPL
Authors
Tomislav Hengl [cre, aut], Andrea Gilardi [ctb], Pierre Roudier [ctb], Dylan Beaudette [ctb], Edzer Pebesma [ctb], Michael Blaschek [ctb]
Initial release
2021-04-12

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.