| map.groups {maptree} | R Documentation |
Draws maps of groups of observations created by clustering, classification or regression trees, or some other type of classification.
map.groups (pts, size=5, col=NULL, gon=10, lns=NULL,
lcol=1, lwd=par("lwd"))
pts |
matrix or data frame with components "x",
"y", and "group". |
size |
size in mm of shaded square symbol. |
col |
vector of colors from hsv, rgb
etc, or if NULL, then generated as equally spaced hues, or
if "gray", then generated as gray tones. |
gon |
number of sides for polygon symbol (>8 => circle). |
lns |
matrix of S format lines coordinates, or
a list of several matrices. |
lcol |
index for line color, or a vector of several indeces recycled if necessary. |
lwd |
line width, or a vector of several widths recycled if necessary. |
Uses ngon to draw shaded polygon symbols for
each observation in pts.
The vector of colors supplied or generated.
Denis White, white.denis@epa.gov
ngon,
lines,
group.clust,
group.tree,
map.key
data (spp.names, hex.env, hex.spp, oregon)
# range map for American Avocet
spp <- match ("American avocet", spp.names[["common.name"]])
map.groups (cbind (hex.env, group=hex.spp[,spp]+1),
col="gray", gon=6, lns=oregon)
# distribution of January temperatures
cuts <- quantile (hex.env[["jan.temp"]], probs=seq(0,1,1/5))
group <- cut (hex.env[["jan.temp"]], cuts, labels=FALSE,
include.lowest=TRUE)
map.groups (cbind (hex.env, group=group),
col="gray", gon=6, lns=oregon)