"plot"(x, which, col = par("fg"), fill, borderCoastline = NA, colCoastline = "lightgray", eos = getOption("oceEOS", default = "gsw"), ref.lat = NaN, ref.lon = NaN, grid = TRUE, coastline = "best", Slim, Clim, Tlim, plim, densitylim, N2lim, Rrholim, dpdtlim, timelim, lonlim, latlim, drawIsobaths = FALSE, clongitude, clatitude, span, showHemi = TRUE, lonlabel = NULL, latlabel = NULL, sides = NULL, projection = NULL, parameters = NULL, orientation = NULL, latlon.pch = 20, latlon.cex = 1.5, latlon.col = "red", cex = 1, cex.axis = par("cex.axis"), pch = 1, useSmoothScatter = FALSE, df, keepNA = FALSE, type = "l", adorn = NULL, mgp = getOption("oceMgp"), mar = c(mgp[1] + 1.5, mgp[1] + 1.5, mgp[1] + 1.5, mgp[1] + 1), inset = FALSE, add = FALSE, debug = getOption("oceDebug"), ...)
ctd
object, i.e. one inheriting from ctd-class
.which
is not
supplied, a default will be used. This default will be c(1,2,3,5)
if the
CTD is in profiling mode (i.e. if deploymentType
in the metadata
slot equals "profile"
,
or is missing) or
"thermosalinograph"
, the default will be c(30, 3, 31, 5)
. If it
is "towyo"
, c(30, 31, 32, 3)
will be used. Details are as follows.which=1
or which="salinity+temperature"
gives
a combined profile of temperature and salinity
which=2
or which="density+N2"
gives a combined
profile of $sigma-theta$ and $N^2$
which=3
or which="TS"
gives a TS plot
which=4
or which="text"
gives a textual
summary of some aspects of the data
which=5
or which="map"
gives a map plotted
with plot,coastline-method
, with a dot for
the station location. Notes near the top boundary of the map give the
station number, the sampling date, and the name of the chief scientist,
if these are known. Note that the longitude will be converted to a value
between -180 and 180 before plotting. (See also notes
about span
.)
which=5.1
as for which=5
, except that the file name
is drawn above the map
which=6
or which="density+dpdt"
gives a
profile of density and $dP/dt$, which is useful for
evaluating whether the instrument is dropping properly through the
water column
which=7
or which="density+time"
gives a
profile of density and time
which=8
or which="index"
gives a profile of
index number (especially useful for ctdTrim
)
which=9
or which="salinity"
gives a salinity profile
which=10
or which="temperature"
gives a temperature profile
which=11
or which="density"
gives a density profile
which=12
or which="N2"
gives an $N^2$ profile
which=13
or which="spice"
gives a spiciness profile
which=14
or which="tritium"
gives a tritium profile
which=15
or which="Rrho"
gives an Rrho profile
which=16
or which="RrhoSF"
gives an RrhoSF profile
which=17
or which="conductivity"
gives a conductivity profile
plot,coastline-method
if a map is included in which
.plot,coastline-method
if a map is included in which
. Set to
NULL
to avoid filling."unesco"
or "gsw"
.TRUE
to get a grid on all plots.which="map"
. This may be a coastline object, whether built-in or
supplied by the user, or a character string. If the later, it may be the
name of a built-in coastline ("coastlineWorld"
,
"coastlineWorldFine"
, or
"coastlineWorldCoarse"
), or "best"
, to choose
a suitable coastline for the locale, or "none"
to prevent
the drawing of a coastline. There is a speed penalty for providing
coastline
as a character string, because it forces
plot,coastline-method
to load it on every call. So, if
plot,coastline-method
is to be called several times for a given
coastline, it makes sense to load it in before the first call, and to
supply the object as an argument, as opposed to the name of the object.which
equals "map"
or
the equivalent numerical code, 5
. If drawIsobaths
is
FALSE
, then no contours are drawn. If drawIsobaths
is TRUE
, then contours are selected automatically,
using pretty(c(0,300))
if the station depth is
under 100m or pretty(c(0,5500))
otherwise.
If drawIsobaths
is a numerical vector,
then the indicated depths are drawn. For plots drawn with projection
set to NULL
, the contours are added with contour
and otherwise mapContour
is used. To customize
the resultant contours, e.g. setting particular line types or colours,
users should call these functions directly (see e.g. Example 2).plot,coastline-method
.
Using these arguments permits reasonably simple customization. If they are are
not provided, reasonable defaults will be used.NULL
, no
projection will be used; the map will simply show longitude and latitude in a
cartesian frame, scaled to retain shapes at the centre. If this is the string
"automatic"
, then either a Mercator or Stereographic projection will be
used, depending on whether the CTD station is within 70 degrees of the equator
or at higher latitudes. Finally, if this is a string in the format used by
mapPlot
, then it is is passed to that function.projection
.projection
.par
).par
).par
).TRUE
to use
smoothScatter
instead of plot
to draw the plot.swN2
as the argument
named df
.NA
values in linegraphs,
which will yield breaks in the lines.plot
.expression
or vector of expressions that contain
R code that is to be executed immediately after each panel of the plot.
If the number of expressions matches the number of panels, then the
expressions are used for the corresponding panels; otherwise, the
expression list is extended to match the number of panels (i.e.
to obtain length(which)
elements). Note that adorn
is a dangerous argument, because if the expressions contained
therein set up local storage, there is a chance of entirely
disrupting the plotting. For this reason, adorn
was
marked as defunct in June 2016, and will be removed entirely
after the July CRAN release. Users with existing code that uses
adorn
should simply plot the panels individually, and
use conventional R functions, e.g. lines
etc.,
after each panel, to achieve the desired effect. (See
oce-defunct
for notes on other deprecated or
defunct oce
features.)par
.
The default establishes tighter margins than in the usual R setup.par
.
The default establishes tighter margins than in the usual R setup.length(which)=1
, and it will yield odd results if the
value of which
does not match that in the previous plots.oce
functions. Generally, setting debug=0
turns off the printing, while higher values suggest that more information
be printed.df
, for use in swN2 calculations.plot,ctd-method
relied on a now-defunct argument
fill
to control colours; colCoastline
is to be used now, instead.
Also, now it is possible to set the edge of coasts and international
boundaries, with borderCoastline
.which
and other arguments are chosen to be useful
for quick overviews of data. However, for detailed work it is common
to call the present function with just a single value of which
, e.g.
with four calls to get four panels. The advantage of this is that it provides
much more control over the display, and also it permits the addition of extra
display elements (lines, points, margin notes, etc.) to the individual panels.Note that panels that draw more than one curve (e.g. which="salinity+temperature"
draws temperature and salinity profiles in one graph), the value of par("usr")
is established by the second profile to have been drawn. Some experimentation will
reveal what this profile is, for each permitted which
case, although
it seems unlikely that this will help much ... the simple fact is that drawing two
profiles in one graph is useful for a quick overview, but not useful for e.g. interactive
analysis with locator
to flag bad data, etc.
ctd-class
explains the structure of CTD
objects, and also outlines the other functions dealing with them.Other functions that plot oce
data: plot,adp-method
,
plot,adv-method
,
plot,amsr-method
,
plot,argo-method
,
plot,bremen-method
,
plot,cm-method
,
plot,coastline-method
,
plot,gps-method
,
plot,ladp-method
,
plot,lisst-method
,
plot,lobo-method
,
plot,met-method
,
plot,odf-method
,
plot,rsk-method
,
plot,satellite-method
,
plot,sealevel-method
,
plot,section-method
,
plot,tidem-method
,
plot,topo-method
,
plot,windrose-method
,
plotProfile
, plotScan
,
plotTS
, tidem-class
Other things related to ctd
data: [[,ctd-method
,
[[<-,ctd-method
, as.ctd
,
cnvName2oceName
, ctd-class
,
ctdDecimate
, ctdFindProfiles
,
ctdRaw
, ctdTrim
,
ctd
, handleFlags,ctd-method
,
plotProfile
, plotScan
,
plotTS
, read.ctd.itp
,
read.ctd.odf
, read.ctd.sbe
,
read.ctd.woce.other
,
read.ctd.woce
, read.ctd
,
subset,ctd-method
,
summary,ctd-method
,
woceNames2oceNames
, write.ctd
## 1. simple plot
library(oce)
data(ctd)
plot(ctd)
## 2. how to customize depth contours
par(mfrow=c(1,2))
data(section)
stn <- section[["station", 105]]
plot(stn, which='map', drawIsobaths=TRUE)
plot(stn, which='map')
data(topoWorld)
tlon <- topoWorld[["longitude"]]
tlat <- topoWorld[["latitude"]]
tdep <- -topoWorld[["z"]]
contour(tlon, tlat, tdep, drawlabels=FALSE,
levels=seq(1000,6000,1000), col='lightblue', add=TRUE)
contour(tlon, tlat, tdep, vfont=c("sans serif", "bold"),
levels=stn[['waterDepth']], col='red', lwd=2, add=TRUE)
Run the code above in your browser using DataLab