Learn R Programming

oce (version 0.2-1)

plot.adv: Plot ADV data

Description

Plot ADV data.

Usage

## S3 method for class 'adv':
plot(x, which=c(1:3,14,15),
    col,
    titles,
    type="l",
    lwd=par('lwd'),
    adorn=NULL,
    drawTimeRange=getOption("oceDrawTimeRange"),
    drawZeroLine=FALSE,
    useSmoothScatter,
    mgp=getOption("oceMgp"),
    mar=c(mgp[1]+1.5,mgp[1]+1.5,1.5,1.5),
    marginsAsImage=FALSE,
    cex=par("cex"), cex.axis=par("cex.axis"), cex.main=par("cex.main"),
    xlim, ylim,
    brushCorrelation, colBrush="red",
    main="",
    debug=getOption("oceDebug"),
    ...)

Arguments

x
an adv object, e.g. as read by read.adv.
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.
col
optional indication of colour(s) to use. If not provided, the default for images is oceColorsPalette(128,1), and for lines and points is black.
titles
optional vector of character strings to be used as labels for the plot panels. For images, these strings will be placed in the right hand side of the top margin. For timeseries, these strings are ignored. If this is provi
lwd
if the plot is of a time-series or scattergraph format with lines, this is used in the usual way; otherwise, e.g. for image formats, this is ignored.
type
type of plot, as for plot.
adorn
optional list of expressions to be performed immediately after drawing the panels. (See plot.adp for an example.)
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.
useSmoothScatter
boolean that indicates whether to use smoothScatter in various plots, such as which="uv". If not provided a default is used, with s
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").
marginsAsImage
boolean, TRUE to put a wide margin to the right of time-series plots, matching the space used up by a palette in an imagep plot.
cex
size of labels on axes; see par("cex").
cex.axis
see par("cex.axis").
cex.main
see par("cex.main").
xlim
optional 2-element list for xlim, or 2-column matrix, in which case the rows are used, in order, for the panels of the graph.
ylim
optional 2-element list for ylim, or 2-column matrix, in which case the rows are used, in order, for the panels of the graph.
brushCorrelation
optional number between 0 and 100, indicating a per-beam correlation threshhold below which data are to be considered suspect. If the plot type is p, the suspect points (velocity, backscatter amplitude, or correlation
colBrush
colour to use for brushed (bad) data, if brushCorrelation is active.
main
main title for plot, used just on the top panel, if there are several panels.
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

Creates a multi-panel summary plot of data measured by an ADV. The panels are controlled by the which argument. (Note the gaps in the sequence, e.g. 4 and 8 are not used.)

  • which=1to3(or"u1"to"u3") yield timeseries of the first, second, and third components of velocity (in beam, xyz or enu coordinates).
  • which=4is not permitted (since ADV are 3-beam devices)
  • which=5to7(or"a1"to"a3") yield timeseries of the amplitudes of beams 1 to 3. (Note that the data are calleddata$ma$a[,1],data$ma$a[,2]anddata$ma$a[,3], for these three timeseries.)
  • which=8is not permitted (since ADV are 3-beam devices)
  • which=9to11(or"q1"to"q3") yield timeseries of correlation for beams 1 to 3. (Note that the data are calleddata$ma$c[,1],data$ma$c[,2]anddata$ma$c[,3], for these three timeseries.)
  • which=12is not permitted (since ADVs are 3-beam devices)
  • which=13is not permitted (since ADVs do not measure salinity)
  • which=14orwhich="temperature"yields a timeseries of temperature.
  • which=15orwhich="pressure"yields a timeseries of pressure.
  • which=16orwhich="heading"yields a timeseries of heading.
  • which=17orwhich="pitch"yields a timeseries of pitch.
  • which=18orwhich="roll"yields a timeseries of roll.
  • which=19to21yields plots of correlation versus amplitude, for beams 1 through 3, usingsmoothScatter.
  • which=22is not permitted (since ADVs are 3-beam devices)
  • which=23or"progressive vector"yields a progressive-vector diagram in the horizontal plane, plotted withasp=1, and taking beam1 and beam2 as the eastward and northward components of velocity, respectively.
  • which=28or"uv"yields velocity plot in the horizontal plane, i.e. u[2] versus u[1]. If the number of data points is small, a scattergraph is used, but if it is large,smoothScatteris used.
  • which=29or"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=30or"uv+ellipse+arrow"as the"uv+ellipse"case, but with an added arrow indicating the mean current.
In addition to the above, there are some groupings defined:
  • which="velocity"equivalent towhich=1:3(three velocity components)
  • which="amplitude"equivalent towhich=5:7(three amplitude components)
  • which="backscatter"equivalent towhich=9:11(three backscatter components)
  • which="hydrography"equivalent towhich=14:15(temperature and pressure)
  • which="angles"equivalent towhich=16:18(heading, pitch and roll)

See Also

See read.adv for notes on functions relating to "adv" objects.

Examples

Run this code
library(oce)
adv <- read.oce(
"/data/archive/sleiwex/2008/moorings/m03/adv/sontek_b373h/raw/adv_sontek_b373h.adr",
from=as.POSIXct("2008-07-01"), to=as.POSIXct("2008-07-02"), by="00:05:00")
plot(adv)

Run the code above in your browser using DataLab