mapScalebar {oce} | R Documentation |
Draw a scalebar on an existing map
mapScalebar(x, y=NULL, length, lwd=1.5*par("lwd"), cex=par("cex"), col="black")
x, y |
position of the scalebar. Eventually this should be similar to
the corresponding arguments in |
length |
length to indicate, in kilometres. If not provided, a reasonable choice is made, based on the underlying map. |
lwd |
scalebar line width |
col |
scalebar colour |
cex |
scalebar character size |
The scale is appropriate to the centre of the plot, and will become increasingly inaccurate away from that spot, with the error depending on the projection and the fraction of the earth that is shown.
Dan Kelley
See mapPlot
for general information on plotting maps,
including other functions.
## Not run: library(oce) ## Arctic Ocean data(coastlineWorld) latlim <- 90 + 25 * c(-1, 1) lonlim <- c(-130, -50) orientation <- c(90, -90, 0) proj <- "stereographic" fill <- "lightgray" mapPlot(coastlineWorld, latitudelim=latlim, longitudelim=lonlim, proj=proj, orientation=orientation, axes=FALSE, fill=fill) mapScalebar() ## End(Not run)