## S3 method for class 'section':
plot(x,
which=c(1, 2, 3, 99),
eos=getOption("oceEOS", default="gsw"),
at=NULL,
labels=TRUE,
grid=FALSE,
contourLevels=NULL,
contourLabels=NULL,
stationIndices,
coastline=c("best", "coastlineWorld", "coastlineWorldMedium",
"coastlineWorldFine", "none"),
xlim=NULL,
ylim=NULL,
map.xlim=NULL,
map.ylim=NULL,
clongitude, clatitude, span,
projection=NULL, parameters=NULL, orientation=NULL,
xtype=c("distance", "track", "longitude", "latitude", "time"),
ytype=c("depth", "pressure"),
ztype=c("contour", "image", "points"),
zbreaks=NULL, zcol=NULL,
legend.loc="bottomright",
adorn=NULL,
showStations=FALSE,
showStart=TRUE,
showBottom=TRUE,
axes=TRUE,
mgp=getOption("oceMgp"),
mar=c(mgp[1]+1, mgp[1]+1, mgp[2]+1, mgp[2] + 0.5),
col=par("col"), cex=par("cex"), pch=par("pch"),
debug=getOption("oceDebug"),
...)
section
object, e.g. as created by
as.section
or read.section
.par
i"unesco"
or
"gsw"
.NULL
(the default), the x axis will indicate the
distance of the stations from the first in the section. (This may
give errors in the contouring routine, if the stations are not present
in a geographical order.) Iat
.TRUE
, points are drawn at data locations.station.indices=1:4
."best"
to pick the one with highest
resolution, or "none"
to avoid drawing the coastline.map.ylim
is ignored if map.xlim
is provided.mapPlot
. If
projection="automatic"
, however, a projection is devised from
the data, with stereographic
if the mea"distance"
for distance (in km) to the first point in the
section, "track"
for distance along the cruise track,
"longitude"
, "latitude"
, "pressure"
for pressure (in dbar, with zero at the surface)
or "depth"
for depth (in m below the surface, calculated
from pressure with
ztype="points"
or "image"
. If not provided, a reasonable default is chosen.
If zcol
is a function, it will be invoked with an argument equal
to 1+length
legend
,
or set to the empty string to avoid plotting a legend.polygon
, which fills the space to the bottom,
or lines
, which dpar(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.par("mar")
.par("col")
.par("pch")
(see cex
,
above.)labcex=1
will increase the size of contour labels.which
. The codes are as follows.
which=1
or"temperature"
for temperature contours (the default)which=2
or"salinity"
for salinity contourswhich=3
or"sigmaTheta"
for sigma-theta contourswhich=4
or"nitrate"
for nitrate concentration contourswhich=5
or"nitrite"
for nitrite concentration contourswhich=6
or"oxygen"
for oxygen concentration contourswhich=7
or"phosphate"
for phosphate concentration contourswhich=8
or"silicate"
for silicate concentration contourswhich=9
or"u"
for eastward velocitywhich=10
or"uz"
for vertical derivative of eastward velocitywhich=11
or"v"
for northward velocitywhich=12
or"vz"
for vertical derivative of northward velocitywhich=20
or"data"
for a dot for each data locationwhich=99
or"map"
for a location mapat
is not supplied, then the
routine calculates x as the distance between the first station in the
section and each of the other stations. (This will produce an error if the
stations are not ordered geographically, because the contour
routine cannot handle non-increasing axis coordinates.) If at
is
specified, then it is taken to be the location, in arbitrary units, along
the x-axis of labels specified by labels
; the way this works is
designed to be the same as for axis
.section-class
explains the
structure of section objects, and also outlines the other functions dealing
with them.library(oce)
data(section)
sg <- sectionGrid(section)
## AO3 section
plot(sg, which="salinity", ztype="points", pch=20, cex=1.5)
## Gulf Stream
GS <- subset(section, 109<=stationId&stationId<=129)
GSg <- sectionGrid(GS, p=seq(0,2000,100))
plot(GSg, which=c(1,99), map.ylim=c(34,42))
par(mfrow=c(2,1))
plot(GS, which=1, ylim=c(2000, 0), ztype='points',
zbreaks=seq(0,30,2), pch=20, cex=3)
plot(GSg, which=1, ztype='image', zbreaks=seq(0,30,2))
## image, with coloured dots to show if grid smoothing was OK
plot(GSg, which=1, ztype='image')
T <- GS[['temperature']]
col <- oce.colorsJet(100)[rescale(T, rlow=1, rhigh=100)]
points(GS[['distance']],GS[['depth']],pch=20,cex=3,col='white')
points(GS[['distance']],GS[['depth']],pch=20,cex=2.5,col=col)
Run the code above in your browser using DataLab