Learn R Programming

oce (version 0.8-3)

plot.topo: Plot topography data

Description

Plot contours of topographic data.

Usage

## S3 method for class 'topo':
plot(x, 
     xlab="", ylab="",
     asp,
     center, span,
     expand=1.5,
     water.z,
     col.water,
     lty.water,
     lwd.water,
     land.z, 
     col.land,
     lty.land,
     lwd.land,
     location="topright", 
     mgp=getOption("oceMgp"),
     mar=c(mgp[1]+1,mgp[1]+1,1,1),
     debug=getOption("oceDebug"),
     ...)

Arguments

x
an topo object, e.g. as read by read.topo.
xlab
label for x axis
ylab
label for y axis
asp
Aspect ratio for plot. The default is for plot.coastline to set the aspect ratio to give natural latitude-longitude scaling somewhere near the centre latitude on the plot. Often, it makes sense to set asp yourself, e
center
optional center of map, a vector containing latitude in degrees north, then longitude in degrees east. (Must be accompanied by span.)
span
optional suggested span of plot, in kilometers (must be supplied, if center is supplied).
expand
numerical factor for the expansion of plot limits, showing area outside the plot, e.g. if showing a ship track as a coastline, and then an actual coastline to show the ocean boundary. The value of expand is ignored if either
water.z
depths at which to plot water contours. If not provided, these are inferred from the data.
col.water
colors corresponding to water.z values. If not provided, these will be "fill" colors from oceColorsGebco.
lty.water
line type(s) for water contours
lwd.water
line width(s) for water contours
land.z
depths at which to plot land contours. If not provided, these are inferred from the data. If set to NULL, no land contours will be plotted.
col.land
colors corresponding to land.z values. If not provided, these will be "fill" colors from oceColorsGebco.
lty.land
line type(s) for land contours
lwd.land
line width(s) for land contours
location
location for a legend (or FALSE, for no legend).
mgp
3-element numerical vector to use for par(mgp), and also for par(mar), computed from this. The default is tighter than the R default, in order to use more space for the data and less for the axes.
mar
value to be used with par("mar").
debug
boolean value, set to TRUE to get some debugging information.
...
additional arguments passed on to plotting functions

Details

The plot aspect ratio is set based on the middle latitude in the plot. Be aware that the ETOPO2 data are on a 2-minute (roughly 2-mile) spacing, and coastlines created with such data can be quite inaccurate on scales of 100km or less.

The line properties, such as land.lwd, may either be a single item, or a vector; in the latter case, the length must match the length of the corresponding properties, e.g. land.z.

See Also

TOPO data can be created with read.topo and summarized with summary.topo.

Examples

Run this code
library(oce)
data(topoWorld)
plot(topoWorld)

Run the code above in your browser using DataLab