growingDotLegend {DASplusR}R Documentation

Legend for growing dot maps

Description

Adds a legend to a growing dots map.

Usage

growingDotLegend(dataset,x,y,var,
   type=c("linear","exponential"),radi,title,leg.cex=0.8,
   S=9,s=0.9,wa=0,wb=0.95,wc=0.05, leg.position.x,
   leg.position.y,xMin=NA,xMax=NA,yMin=NA,yMax=NA,
   minsize=1,maxsize=3,x.log=FALSE,y.log=FALSE,color="black")

Arguments

dataset a data object of class 'DASData' or 'data.frame'
x character; the object name of the x-coordinate
y character; the object name of the y-coordinate
var character; the object name of the spatial variable
type character; "linear" or "exponential"
radi numeric; radius of the lagest dot in the map
title character; a string specifying the legend title
leg.cex numeric; a vector of the size of the symbols to be used for generating the legend, recycled if necessary
S numeric; relative radius of the largest dot
s numeric; relative radius of the smallest dot
wa,wb,wc numeric; only for type = "exponential"weights for 0 to 1; the weights must sums up to 1; more details see Gustavsson et al. (1997)
leg.position.x numeric; x-coordinate of the legend
leg.position.y numeric; y-coordinate of the legend
xMin numeric; value for the lower bound of the x-coordinate or NA for no boundary
xMax numeric; value for the upper bound of the x-coordinate or NA for no boundary
yMin numeric; value for the lower bound of the y-coordinate or NA for no boundary
yMax numeric; value for the upper bound of the y-coordinate or NA for no boundary
minsize numeric; minimal size of dots if type is linear
maxsize numeric; maximal size of dots if type is linear
x.log logical; TRUE if logarithmic x-axis
y.log logical; TRUE if logarithmic y-axis
color character; color which should be used for the dots

Details

The function 'growingDotLegend' adds a legend to a growing dot map at the location specified with leg.position.x and leg.position.y.

If any boundary of the coordinates given by xMin,xMax, yMin, yMax the legend is calculated from the corresponding values.

See Also

'plotlegend','growingDotLegend','SmoothLegend'

Examples

require(DASplusR7)
DefaultSymbolSets()
data(KOLA95_C2MM)
growingDot(dataset=KOLA95_C2MM,x="XCOO",y="YCOO",var="Al",
  type="linear",color="black",minsize=1,maxsize=3,
  title="",margin=c(2,2,2,2)+0.1,xMin=NA,xMax=NA,yMin=NA,
  yMax=NA,x.log=FALSE,y.log=FALSE,xlabel="",ylabel="",
  cex.xlab = "1",  cex.ylab="1",font.xlab="1",font.ylab="1",
  frame=TRUE,addP=FALSE)
axis(1,labels=TRUE,font=1,cex.axis=1)
axis(2,labels=TRUE,font=1,cex.axis=1)
growingDotLegend(dataset=KOLA95_C2MM,x="XCOO",y="YCOO",
  var="Al",type="linear",color="black",minsize=1,
  maxsize=3,title="Al [mg/kg]",leg.position.x=796716,
  leg.position.y=7878442,leg.cex=0.8,xMin=NA,xMax=NA,
  yMin=NA,yMax=NA,x.log=FALSE,y.log=FALSE)
scalebar(770333,7376258,min="0",middle="50",max="100",
  unit="km",title="")
northarrow(360157,7820700,360157,7889816,360157,7855695)

[Package DASplusR version 0.0-1 Index]