Learn R Programming

oce (version 0.8-10)

plot.ctd: Plot seawater CTD data

Description

Plot CTD data

Usage

## S3 method for class 'ctd':
plot(x, which=1:4, 
     eos=getOption("eos", default='unesco'),
     ref.lat=NaN, ref.lon=NaN, 
     grid=TRUE, col.grid="lightgray", lty.grid="dotted",
     coastline="coastlineWorld",
     Slim, Tlim, plim, densitylim, N2lim,
     dpdtlim, timelim,
     lonlim, latlim, span,
     latlon.pch=20, latlon.cex=1.5, latlon.col="red",
     cex=1, cex.axis=par('cex.axis'),
     pch=1,
     useSmoothScatter=FALSE,
     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,
     debug=getOption("oceDebug"),
     ...)

Arguments

x
A ctd object, e.g. as read by read.ctd, or a list containing items named salinity and temperature.
which
list of desired plot types.
  • which=1orwhich="salinity+temperature"gives a combined profile of temperature and salinity
  • which=2orwhich="density+N2"gives a combined profi
eos
either "unesco" or "teos". If the latter, then the computer must have the TEOS library installed; see teos. The effect of using "teos" is to us ``absolute sa
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, or a character string naming one. There are several built-in datasets: coastlineWorld (the default), coastlineMaritimes, coastlineHalifax, and coastlineSLE
Slim
optional limits of salinity 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
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)
span
optional span of map, in km (ignored unless a map is being drawn)
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)
cex
size to be used for plot symbols (see par)
cex.axis
size factor for axis labels (see par)
pch
code for plotting symbol (see par).
useSmoothScatter
boolean, set to TRUE to use smoothScatter instead of plot to draw the plot.
keepNA
flag indicating whether to keep NA values in linegraphs, which will yield breaks in the lines.
type
type of plot to draw, using the same scheme as plot.
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 onl
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").
inset
set to TRUE for use within plotInset. The effect is to prevent the present function from adjusting margins, which is necessary because margin adjustment is the basis for the meth
debug
set to a positive value to get debugging information during processing.
...
optional arguments passed to plotting functions. A common example is to set df, for use in swN2 calculations.

Details

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.

See Also

The documentation for ctd-class explains the structure of CTD objects, and also outlines the other functions dealing with them.

Examples

Run this code
library(oce)
data(ctd) 
plot(ctd)
plot(ctd, which=c(1,2,3,5), coastline="coastlineHalifax")

Run the code above in your browser using DataLab