map.key | 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 |
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 |
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
ngon
,
map.groups
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.