| map.key {maptree} | R Documentation |
Draws legends for maps of groups of observations.
map.key (x, y, labels=NULL, cex=par("cex"), pch=par("pch"),
size=2.5*cex, col=NULL, head="", sep=0.25*cex, new=FALSE)
x, y |
coordinates of lower left position of key in proportional units (0-1) of plot. |
labels |
vector of labels for classes, or if NULL,
then integers 1:length(col), or 1. |
size |
size in cex units of shaded key symbol. |
pch |
symbol number from par("pch") if < 100, otherwise
parameter n for ngon. |
cex |
pointsize of text, par parameter. |
head |
text heading for key. |
sep |
separation in cex units between adjacent symbols in key.
If sep=0, assume a continuous scale, use square
symbols, and put labels at breaks between squares. |
col |
vector of colors from hsv, rgb,
etc, or if NULL, then use rainbow. |
new |
if TRUE, call plot. |
Uses points or ngon, depending on value of
pch, to draw shaded polygon symbols for key.
The vector of colors supplied or generated.
Denis White, white.denis@epa.gov
data (oregon.env.vars)
# key for examples in help(map.groups)
# range map for American Avocet
kol <- gray (seq(0.8,0.2,length.out=2))
map.key (0.2, 0.2, labels=c("absent","present"), pch=106,
col=kol, head="key", new=TRUE)
# distribution of January temperatures
cuts <- quantile (oregon.env.vars[["jan.temp"]], probs=seq(0,1,1/5))
kol <- gray (seq(0.8,0.2,length.out=5))
map.key (0.2, 0.2, labels=as.character(round(cuts,0)),
col=kol, sep=0, head="key", new=TRUE)
# key for example in this-is-escaped-codenormal-bracket58bracket-normal
map.key (0.2, 0.2, labels=as.character(seq(6)),
pch=19, head="node", new=TRUE)