plot.ctd {oce} | R Documentation |
Plot a summary diagram for CTD data.
## S3 method for class 'ctd': plot(x, which=1:4, ref.lat=NaN, ref.lon=NaN, grid=TRUE, col.grid="lightgray", lty.grid="dotted", coastline, Slim, Tlim, plim, densitylim, dpdtlim, timelim, lonlim, latlim, latlon.pch=20, latlon.cex=1.5, latlon.col="red", adorn=NULL, mgp=getOption("oce.mgp"), mar=c(mgp[1]+1,mgp[1]+1,mgp[1]+1.5,mgp[1]), ...)
x |
A cdt object, e.g. as read by read.ctd . |
which |
list of desired plot types.
The value which =1 gives a combined profile of temperature and
salinity, which =2 gives a combined profile of sigma-theta and
N^2, which =3 gives a TS plot,
which =4 gives a textual summary of some aspects of the data,
which =5 gives a map, with a dot for the station
location (note that this requires that a coastline be
given), which =6 gives a profile of density and dP/dt (useful
for evaluating whether the instrument is dropping properly through
the water column), which =7 gives a profile of density and
time, which =8 gives a profile of index number (especially
useful for ctd.trim ) and which =9 gives a plot of
density. |
ref.lat |
Latitude of reference point for distance calculation |
ref.lon |
Longitude of reference point for distance calculation |
grid |
Set TRUE to get a grid on all plots. |
col.grid |
colour for the grid. |
lty.grid |
line type for grid. |
coastline |
a coastline object, e.g. as read by
read.coastline (ignored if no map plotted). |
Slim |
optional limits of salinity axes |
Tlim |
optional limits of temperature axes |
plim |
optional limits of pressure axes |
densitylim |
optional limits of density 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) |
latlim |
optional limits of latitude axis of map (ignored if no map plotted) |
latlon.pch |
pch for sample location (ignored if no map plotted) |
latlon.cex |
cex for sample location (ignored if no map plotted) |
latlon.col |
col for sample location (ignored if no map plotted) |
adorn |
list of expressions to be executed for the panels in turn, e.g. to adorn the plots. If the number matches the number of panels, then the strings are applied to the appropriate panels, as they are drawn from top-left to bottom-right. If only a single expression is provided, it is used for all panels. (See “Examples”.) |
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") . |
... |
optional arguments passed to plotting functions. A common
example is to set df , for use in sw.N2 calculations. |
Creates a multi-panel summary plot of data measured in a CTD
cast. The panels are controlled by the which
argument.
Normally, 4 panels are specified with the which
, but it can
also be useful to specify less than 4 panels, and then to draw other
panels after this call.
If only 2 panels are requested, they will be drawn side by side.
If more than one panel is drawn, then on exit from plot.ctd
,
the value of par
will be reset to the value it had before the
function call. However, if only one panel is drawn, the adjustments
to par
made within plot.ctd
are left in place, so that
further additions may be made to the plot.
Dan Kelley
The profiles are plotted with plot.profile
, and
the TS diagram is plotted with plot.TS
. CTD data can be
created with as.ctd
or read with read.ctd
.
Summaries of CTD data are provided by summary.ctd
.
library(oce) data(ctd) plot(ctd) data(coastline.sle) lonlim <- -(69 + c(52, 41) / 60) latlim <- 47 + c(48, 58) / 60 # IAL = Ile aux Lievres plot(ctd, which=c(1,2,3,5), coastline=coastline.sle, lonlim=lonlim, latlim=latlim, adorn=expression({},{},{},{text(-69.72,47.85,'IAL',pos=4)})) # Trimming data(ctd.raw) plot(ctd.raw, which=8) abline(v=100) abline(v=120) abline(v=130) abline(v=350) # The range 130 to 350 seems good, but you can narrow in # by repeating the command below, with differing ranges. plot(ctd.trim(ctd.raw, "index", 130:350), which=8) # See results ctd.trimmed <- ctd.trim(ctd.raw, "index", 130:350) plot(ctd.trimmed)