Learn R Programming

oce (version 1.7-10)

plotScan: Plot CTD data in a Low-Level Fashion

Description

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

Usage

plotScan(
  x,
  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")
)

Arguments

x

a ctd object.

which

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.

xtype

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.

flipy

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.

type

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.

mgp

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.

xlim

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

ylim

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

mar

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.

debug

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.

Author

Dan Kelley

See Also

Other functions that plot oce data: download.amsr(), plot,adp-method, plot,adv-method, plot,amsr-method, plot,argo-method, plot,bremen-method, plot,cm-method, plot,coastline-method, plot,ctd-method, plot,gps-method, plot,ladp-method, plot,landsat-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, plot,xbt-method, plotProfile(), plotTS(), tidem-class

Other things related to ctd data: CTD_BCD2014666_008_1_DN.ODF.gz, [[,ctd-method, [[<-,ctd-method, as.ctd(), cnvName2oceName(), ctd-class, ctd.cnv, ctdDecimate(), ctdFindProfiles(), ctdRaw, ctdRepair(), ctdTrim(), ctd_aml.csv, ctd, d200321-001.ctd, d201211_0011.cnv, handleFlags,ctd-method, initialize,ctd-method, initializeFlagScheme,ctd-method, oceNames2whpNames(), oceUnits2whpUnits(), plot,ctd-method, plotProfile(), plotTS(), read.ctd.aml(), read.ctd.itp(), read.ctd.odf(), read.ctd.odv(), read.ctd.sbe(), read.ctd.ssda(), read.ctd.woce.other(), read.ctd.woce(), read.ctd(), setFlags,ctd-method, subset,ctd-method, summary,ctd-method, woceNames2oceNames(), woceUnit2oceUnit(), write.ctd()

Examples

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

Run the code above in your browser using DataLab