net.map.key {stream.net} | R Documentation |
Draw a legend to accompany a map of a stream attribute.
net.map.key (x, y, labels=NULL, cex=par("cex"), pch=par("pch"), size=2.5*cex, col=NULL, head="", sep=0.25*cex, horizontal=FALSE, new=FALSE)
x,y |
lower left coordinates of key in proportional units [0, 1]. |
labels |
vector of labels for classes
if NULL , use integers 1:length(col),
except if is.null (col) then use "1". |
cex |
par parameter for size of
text. |
pch |
par parameter for type of
symbols. |
size |
size of key symbols in cex units. |
col |
par parameter for color codes.
Default ramp is yellow-red-brown. |
head |
text heading for key. |
sep |
separation in cex units between
adjacent symbols. If sep=0 , assume continuous
scale and use pch=15 , and put lables at
breaks between squares. |
new |
if TRUE , create a new plot. |
horizontal |
if TRUE , key runs horizontal. |
Alternative to legend
.
A vector of the colors provided or generated returned
as invisible
.
Denis White, white.denis@epa.gov
data (marys.aat, marys.lin, marys.pol, marys.elevslope) net <- net.arcinput (marys.aat, marys.lin) net.map (net, outline=marys.pol, col="blue") hist (marys.elevslope$elev, col="gray") hist (marys.elevslope$slope, col="gray") classes <- net.group (net, marys.elevslope$elev, ngroups=7, method="equalInterval") net.map (net, group=classes$group, lwd=2, outline=marys.pol) net.map.key (0.8, 0.1, labels=round(classes$cuts, 0), sep=0, head="elev", horizontal=FALSE) classes <- net.group (net, marys.elevslope$slope, ngroups=7, method="equalInterval") net.map (net, group=classes$group, lwd=2, outline=marys.pol) net.map.key (0.8, 0.1, labels=round(classes$cuts, 2), sep=0, head="slope", horizontal=FALSE)