map.key {maptree} | R Documentation |
Draw Key to accompany Map of Groups
Description
Draws legends for maps of groups of observations.
Usage
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)
Arguments
x , y |
coordinates of lower left position of key in proportional units (0-1) of plot. |
labels |
vector of labels for classes, or if |
size |
size in cex units of shaded key symbol. |
pch |
symbol number for |
cex |
pointsize of text, |
head |
text heading for key. |
sep |
separation in cex units between adjacent symbols in key.
If |
col |
vector of colors from |
new |
if |
Details
Uses points
or ngon
, depending on value of
pch
, to draw shaded polygon symbols for key.
Value
The vector of colors supplied or generated.
Author(s)
Denis White
See Also
Examples
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 help file for group.tree
map.key (0.2, 0.2, labels=as.character(seq(6)),
pch=19, head="node", new=TRUE)
[Package maptree version 1.4-8 Index]