net.map.key {stream.net}R Documentation

Draw Legend for a Map of a Stream Attribute

Description

Draw a legend to accompany a map of a stream attribute.

Usage

  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)

Arguments

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.

Details

Alternative to legend.

Value

A vector of the colors provided or generated returned as invisible.

Author(s)

Denis White, white.denis@epa.gov

See Also

net.object net.group

Examples

  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)

[Package stream.net version 1.0.6 Index]