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 |
vector of longitudes of points to be plotted, or an object of
class |
latitude |
vector of latitudes of points to be plotted. |
z |
matrix to be contoured. |
nlevels |
number of contour levels, if and only if |
levels |
vector of contour levels. |
col |
line colour. |
lty |
line type. |
lwd |
line width. |
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
A map must first have been created with mapPlot
.
Other functions related to maps: lonlat2map
,
lonlat2utm
, map2lonlat
,
mapArrows
, mapAxis
,
mapDirectionField
, mapGrid
,
mapImage
, mapLines
,
mapLocator
,
mapLongitudeLatitudeXY
,
mapPlot
, mapPoints
,
mapPolygon
, mapScalebar
,
mapText
, mapTissot
,
oceCRS
, shiftLongitude
,
utm2lonlat
## 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), projection="+proj=stere +lat_0=90") 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)