Creates a multi-panel summary plot of data measured by a current meter.

# S4 method for cm
plot(
  x,
  which = c(1:2, 7:9),
  type = "l",
  drawTimeRange = getOption("oceDrawTimeRange"),
  drawZeroLine = FALSE,
  mgp = getOption("oceMgp"),
  mar = c(mgp[1] + 1.5, mgp[1] + 1.5, 1.5, 1.5),
  small = 2000,
  main = "",
  tformat,
  debug = getOption("oceDebug"),
  ...
)

Arguments

x

a cm object.

which

list of desired plot types. These are graphed in panels running down from the top of the page. See “Details” for the meanings of various values of which.

type

type of plot, as for plot().

drawTimeRange

boolean that applies to panels with time as the horizontal axis, indicating whether to draw the time range in the top-left margin of the plot.

drawZeroLine

boolean that indicates whether to draw zero lines on velocities.

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").

small

an integer indicating the size of data set to be considered "small", to be plotted with points or lines using the standard plot() function. Data sets with more than small points will be plotted with smoothScatter() instead.

main

main title for plot, used just on the top panel, if there are several panels.

tformat

optional argument passed to oce.plot.ts(), for plot types that call that function. (See strptime() for the format used.)

debug

a flag that turns on debugging. Set to 1 to get a moderate amount of debugging information, or to 2 to get more.

...

Optional arguments passed to plotting functions.

Details

The panels are controlled by the which argument, as follows.

  • which=1 or which="u" for a time-series graph of eastward velocity, u, as a function of time.

  • which=2 or which="v" for a time-series graph of northward velocity, u, as a function of time.

  • which=3 or "progressive vector" for progressive-vector plot

  • which=4 or "uv" for a plot of v versus u. (Dots are used for small datasets, and smoothScatter for large ones.)

  • which=5 or "uv+ellipse" as the "uv" case, but with an added indication of the tidal ellipse, calculated from the eigen vectors of the covariance matrix.

  • which=6 or "uv+ellipse+arrow" as the "uv+ellipse" case, but with an added arrow indicating the mean current.

  • which=7 or "pressure" for pressure

  • which=8 or "salinity" for salinity

  • which=9 or "temperature" for temperature

  • which=10 or "TS" for a TS diagram

  • which=11 or "conductivity" for conductivity

  • which=20 or "direction" for the direction of flow

See also

Examples

library(oce) data(cm) summary(cm)
#> Cm summary #> ---------- #> #> * File source: "/data/archive/sleiwex/2008/moorings/m11/cm/interocean_0811786/manufacturer/cm_interocean_0811786.s4a.tab" #> * Instrument type: (2Hz)S4 #> * Serial Number: 8111786 #> * Version: 2.399 #> * Time ranges from 2008-06-26 to 2008-06-26 23:59:00 with 1440 samples and mean increment 1 min #> * Data Overview #> #> Min. Mean Max. Dim. NAs OriginalName #> Sample.. 842 1561.5 2281 1440 0 Sample # #> Date NA NA NA 1440 0 Date #> Time NA NA NA 1440 0 Time #> dec.S 0 0 0 1440 0 dec S #> v [m/s] -0.862 -0.088736 0.74 1440 0 Vnorth #> u [m/s] -0.478 0.02761 0.654 1440 0 Veast #> Speed 1.44 53.569 98.29 1440 0 Speed #> Dir 7 126.99 352.1 1440 0 Dir #> Vref NA NA NA 1440 1440 Vref #> Hx -210 -31.052 177 1440 0 Hx #> Hy -212 -0.58889 211 1440 0 Hy #> conductivity [mS/cm] 36.8 36.924 37.2 1440 0 Cond #> temperature [°C, ITS-90] 1.204 2.0773 3.065 1440 0 T-Temp #> Depth 73.242 74.767 77.148 1440 0 Depth #> none NA NA NA 1440 1440 none #> none.1 NA NA NA 1440 1440 none #> Hdg 0 175.79 359.2 1440 0 Hdg #> X NA NA NA 1440 1440 - #> salinity [PSS-78] 41.307 42.71 44.205 1440 0 Sal #> Dens 1033.3 1034.5 1035.8 1440 0 Dens #> SV 1467.9 1469.8 1472.2 1440 0 SV #> X.1 NA NA NA 1440 1440 - #> N.S.Dist -2535.2 4159.5 10349 1440 0 N-S Dist #> E.W.Dist -2033.5 893.81 4687.5 1440 0 E-W Dist #> X.2 NA NA NA 1440 1440 - #> SRB.Date NA NA NA 1440 1440 SRB Date #> SRB.Time NA NA NA 1440 1440 SRB Time #> Vref.1 1.226 1.2263 1.23 1440 1152 Vref #> Hx.1 NA NA NA 1440 1440 Hx #> Hy.1 NA NA NA 1440 1440 Hy #> Cond.1 NA NA NA 1440 1440 Cond #> T.Temp.1 NA NA NA 1440 1440 T-Temp #> Depth.1 NA NA NA 1440 1440 Depth #> none.2 NA NA NA 1440 1440 none #> none.3 NA NA NA 1440 1440 none #> Hdg.1 NA NA NA 1440 1440 Hdg #> X.3 NA NA NA 1440 1440 - #> Sal.1 NA NA NA 1440 1440 Sal #> Dens.1 NA NA NA 1440 1440 Dens #> SV.1 NA NA NA 1440 1440 SV #> pressure [dbar] 73.855 75.392 77.794 1440 0 - #> #> * Processing Log #> #> - 2016-08-01 11:20:36 UTC: `create 'cm' object` #> - 2016-08-01 11:20:36 UTC: `read.oce(file = "/data/archive/sleiwex/2008/moorings/m11/cm/interocean_0811786/manufacturer/cm_interocean_0811786.s4a.tab", from = 840, to = 840 + 24 * 60)` #> - 2016-08-01 11:20:36 UTC: `subset.cm(x, subset=time < as.POSIXct("2008-06-27 00:00:00", tz = "UTC"))`
plot(cm)