plot,ctd-method {oce} | R Documentation |
Plot CTD data, by default in a four-panel display showing (a) profiles of salinity and temperature, (b) profiles of density and the square of buoyancy frequency, (c) a TS diagram and (d) a coastline diagram indicating the station location.
## S4 method for signature 'ctd' 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"), ...)
x |
A |
which |
List of desired plot types, as given below. If
|
col |
Colour of lines or symbols. |
fill |
A legacy parameter that will be permitted only temporarily; see “History”. |
borderCoastline |
Colour of coastlines and international borders, passed
to |
colCoastline |
Fill colour of coastlines and international borders, passed
to |
eos |
String indicating the equation of state to be used, either
|
ref.lat |
Latitude of reference point for distance calculation. |
ref.lon |
Longitude of reference point for distance calculation. |
grid |
Set |
coastline |
A specification of the coastline to be used for
|
Slim |
Optional limits of salinity axes. |
Clim |
Optional limits of conductivity axes. |
Tlim |
Optional limits of temperature axes. |
plim |
Optional limits of pressure axes. |
densitylim |
Optional limits of density axis. |
N2lim |
Optional limits of N^2 axis. |
Rrholim |
Optional limits of R_rho axis. |
dpdtlim |
Optional limits of dP/dt axis. |
timelim |
Optional limits of delta-time axis. |
lonlim |
Optional limits of longitude axis of map (ignored if no map plotted) DEPRECATED 2014-01-07. |
latlim |
Optional limits of latitude axis of map (ignored if no map plotted) DEPRECATED 2014-01-07. |
drawIsobaths |
An indication of whether to draw depth contours on
maps, in addition to the coastline. The argument has no effect except
for panels in which the value of |
clongitude |
Center longitude. |
clatitude |
Center latitude. |
span |
Optional span of map, in km. If not given, this will be determined as a small multiple of the distance to the nearest point of land, in an attempt to show some coastline in the plot. |
showHemi |
Logical indicating whether to show hemisphere in axis tick labels. |
lonlabel, latlabel, sides |
Optional vectors of longitude and latitude to
label on the indicated sides of plot, passed to |
projection |
Projection for map, if desired. If this is |
parameters |
a deprecated argument that has been ignored since February 2016; see oce-deprecated. |
orientation |
a deprecated argument that has been ignored since February 2016; see oce-deprecated. |
latlon.pch |
Symbol code for sample location (ignored if no map plotted). |
latlon.cex |
Symbol expansion factor for sample location (ignored if no map plotted). |
latlon.col |
Colour of symbol for sample location (ignored if no map plotted). |
cex |
Size to be used for plot symbols (see |
cex.axis |
Size factor for axis labels (see |
pch |
Code for plotting symbol (see |
useSmoothScatter |
Boolean, set to |
df |
Optional argument that is ignored except for plotting buoyancy
frequency; in that case, it is passed to |
keepNA |
Flag indicating whether to keep |
type |
The type of plot to draw, using the same scheme as
|
adorn |
(Defunct)
An |
mgp |
Three-element numerical vector specifying axis-label geometry,
passed to |
mar |
Four-element numerical vector specifying margin geometry,
passed to |
inset |
Set to |
add |
Logical, indication of whether to add to an existing plot. This
only works if |
debug |
an integer specifying whether debugging information is
to be printed during the processing. This is a general parameter that
is used by many |
... |
Optional arguments passed to plotting functions. A common example is
to set |
Creates a multi-panel summary plot of data measured in a CTD cast. The
default values of 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.
Until February, 2016, 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 colour of coasts and international
boundaries, with borderCoastline
.
Dan Kelley
The documentation for 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
,
oceNames2whpNames
,
oceUnits2whpUnits
,
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
,
woceUnit2oceUnit
, 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)