plot.topo {oce} | R Documentation |
Plot contours of topographic data.
## S3 method for class 'topo': plot(x, water.z, water.col, water.lty, water.lwd, land.z, land.col, land.lty, land.lwd, legend.loc="topright", asp, mgp=getOption("oce.mgp"), mar=c(mgp[1],mgp[1],0.5,0.5), ...)
x |
an topo object, e.g. as read by read.topo . |
water.z |
depths at which to plot water contours. If not provided, these are inferred from the data. |
water.col |
colors corresponding to water.z values. If
not provided, these will be "fill" colors from
oce.colors.gebco . |
water.lty |
line type(s) for water contours |
water.lwd |
line width(s) for water contours |
land.z |
depths at which to plot land contours. If not provided, these are inferred from the data. |
land.col |
colors corresponding to land.z values. If
not provided, these will be "fill" colors from
oce.colors.gebco . |
land.lty |
line type(s) for land contours |
land.lwd |
line width(s) for land contours |
legend.loc |
location for a legend (or FALSE, for no legend). |
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.g. to get
correct shapes at 45N, use asp=1/cos(45*pi/180) .
Note that the land mass is not symmetric about the equator, so
to get good world views you should set asp=1 or
set ylim to be symmetric about zero. |
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") . |
... |
additional arguments passed on to plotting functions |
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
.
Dan Kelley
TOPO data can be created with read.topo
and
summarized with summary.topo
.
library(oce) data(topo.maritimes) plot(topo.maritimes)