Plot CTD data as time-series against scan number, to help with trimming extraneous data from a CTD cast.

  which = 1,
  xtype = "scan",
  flipy = FALSE,
  type = "l",
  mgp = getOption("oceMgp"),
  xlim = NULL,
  ylim = NULL,
  mar = c(mgp[1] + 1.5, mgp[1] + 1.5, mgp[1], mgp[1]),
  debug = getOption("oceDebug")



a ctd object.


Numerical vector numerical codes specifying the panels to draw: 1 for pressure vs scan, 2 for diff(pressure) vs scan, 3 for temperature vs scan, and 4 for salinity vs scan.


Character string indicating variable for the x axis. May be "scan" (the default) or "time". In the former case, a scan variable will be created using seq_along(), if necessary. In the latter case, an error results if the data slot of x lacks a variable called time.


Logical value, ignored unless which is 1. If flipy is TRUE, then a pressure plot will have high pressures at the bottom of the axis.


Character indicating the line type, as for plot.default(). The default is "l", meaning to connect data with line segments. Another good choice is "o", to add points at the data.


Three-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.


Limits on the x value. The default, NULL, is to select this from the data.


Limits on the y value. The default, NULL, is to select this from the data.


Four-element vector be used with par("mar"). If set to NULL, then par("mar") is used. A good choice for a TS diagram with a palette to the right is mar=par("mar")+c(0, 0, 0, 1)).


Optional arguments passed to plotting functions.


an integer specifying whether debugging information is to be printed during the processing. This is a general parameter that is used by many oce functions. Generally, setting debug=0 turns off the printing, while higher values suggest that more information be printed. If one function calls another, it usually reduces the value of debug first, so that a user can often obtain deeper debugging by specifying higher debug values.

See also


library(oce) data(ctdRaw) plotScan(ctdRaw)
abline(v=c(130, 350), col='red') # useful for ctdTrim()