mapContour {oce} | R Documentation |
Plot contours on an existing map
mapContour(longitude=seq(0, 1, length.out=nrow(z)), latitude=seq(0, 1, length.out=ncol(z)), z, nlevels=10, levels=pretty(range(z, na.rm=TRUE), nlevels), col=par("fg"), lty=par("lty"), lwd=par("lwd"))
longitude |
longitudes of points to be plotted, or an object of class
|
latitude |
latitudes of points to be plotted |
z |
matrix to be contoured |
nlevels |
number of contour levels, if and only if |
levels |
list of contour levels |
col |
colour of lines |
lty |
type of lines |
lwd |
width of lines |
Adds contour lines to an existing map, using mapLines
.
The arguments are based on those to contour
and
contourLines
.
As with mapLines
, long lines should be subdivided
into multiple segments so that e.g. great circle lines will be curved.
Dan Kelley
See mapPlot
for general information on plotting maps,
including other functions.
## Not run: library(oce) data(coastlineWorld) par(mar=rep(1, 4)) ## Arctic 100m, 2km, 3km isobaths, showing shelves and ridges. mapPlot(coastlineWorld, latitudelim=c(60,120), longitudelim=c(-130,-50), proj="stereographic", orientation=c(90, -90, 0), axes=FALSE, fill='lightgray') data(topoWorld) lon <- topoWorld[['longitude']] lat <- topoWorld[['latitude']] z <- topoWorld[['z']] mapContour(lon, lat, z, levels=c(-100, -2000, -3000),col=1:3,lwd=2) ## End(Not run)