## S3 method for class 'adp':
plot(x, which=1:dim(x$data$ma$v)[3],
col,
zlim,
titles,
lwd=par('lwd'),
type='l',
ytype=c("profile", "distance"),
adorn=NULL,
drawTimeRange=getOption("oceDrawTimeRange"),
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,
control,
useLayout=FALSE,
main="",
debug=getOption("oceDebug"),
...)
adp
object, e.g. as read by read.adp
.which
.oceColorsPalette(128,1)
, and for
lines and points is black.zlim
parameter to the
imagep
call that is used to create the image. If
omitted, zlim
is set for each panel individually, to
encompass the data"l"
for lines, etc.; otherwise, as for
image formats, this is ignored."distance"
, then the y
axis will be distance from the sensor head, with smaller distances
nearer the bottom of the graph. If "pro
smoothScatter
in various plots, such as which="uv"
.
If not provided a default is used, with s
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.par("mar")
.TRUE
to put a wide margin to the
right of time-series plots, even if there are no images in the which
list. (The margin is made wide if there are some images in the sequence.)par
("cex").par
("cex.axis").par
("cex.main").xlim
, or 2-column matrix, in which case
the rows are used, in order, for the panels of the graph.ylim
, or 2-column matrix, in which case
the rows are used, in order, for the panels of the graph.drawBottom
(a boolean
that indicates whether to draw the bottom) and bin
(a numeric giving
the index of the bin on which to acFALSE
to prevent using
layout
to set up the plot. This is needed if the call
is to be part of a sequence set up by e.g. par(mfrow)
.despike=TRUE
will cause time-series panels to
be de-spiked with despike
.which
argument.
which=1:4
(orwhich="u1"
to"u4"
) yield a
distance-time image plot of a velocity component. Ifx
is
inbeam
coordinates (signalled byx$metadata$oce.coordinate=="beam"
), this will be the beam
velocity, labelledb[1]
etc. Ifx
is in xyz
coordinates (sometimes called frame coordinates, or ship
coordinates), it will be the velocity component to the right of
the frame or ship (labelledu
etc). Finally, ifx
is in"enu"
coordinates, the image will show the the
eastward component (labelledeast
). Ifx
is in"other"
coordinates, it will be component corresponding to
east, after rotation (labelledu'
). Note that the
coordinate is set byread.adp
, or bybeamToXyzAdp
,xyzToEnuAdp
, orenuToOtherAdp
.which=5:8
(orwhich="a1"
to"a4"
) yield
distance-time images of backscatter intensity of the respective beams.which=9:12
(orwhich="q1"
to"q4"
) yield
distance-time images of signal quality for the respective beams.which=13
(orwhich="salinity"
) yields a
time-series plot of salinity.which=14
(orwhich="temperature"
) yields a
time-series plot of temperature.which=15
(orwhich="pressure"
) yields a
time-series plot of pressure.which=16
(orwhich="heading"
) yields a
time-series plot of instrument heading.which=17
(orwhich="pitch"
) yields a time-series
plot of instrument pitch.which=18
(orwhich="roll"
) yields a time-series
plot of instrument roll.which=19
yields a time-series plot of distance-averaged
velocity for beam 1, rightward velocity, eastward velocity, or
rotated-eastward velocity, depending on the coordinate system.which=20
yields a time-series of distance-averaged
velocity for beam 2, foreward velocity, northward velocity, or
rotated-northward velocity, depending on the coordinate system.which=21
yields a time-series of distance-averaged
velocity for beam 3, up-frame velocity, upward velocity, or
rotated-upward velocity, depending on the coordinate system.which=22
yields a time-series of distance-averaged
velocity for beam 4, forbeam
coordinates, or velocity
estimate, for other coordinates. (This is ignored for 3-beam
data.)which=23
yields a progressive-vector diagram in the
horizontal plane, plotted withasp=1
. Normally, the
depth-averaged velocity components are used, but if thecontrol
list contains an item namedbin
, then the
depth bin will be used (with an error resulting if the bin is out
of range).which=24
yields a time-averaged profile of the first
component of velocity (seewhich=19
for the meaning of the
component, in various coordinate systems).which=25
as for 24, but the second component.which=26
as for 24, but the third component.which=27
as for 24, but the fourth component (if that
makes sense, for the given instrument).which=28
or"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,smoothScatter
is used.which=29
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=30
or"uv+ellipse+arrow"
as the"uv+ellipse"
case, but with an added arrow indicating the
mean current.which=40
or"bottom range"
for average bottom range
from all beams of the instrument.which=41
to44
(or"bottom range1"
to"bottom range1"
) for bottom range from beams 1 to 4.which=50
or"bottom velocity"
for average bottom velocity
from all beams of the instrument.which=51
to54
(or"bottom velocity1"
to"bottom velocity4"
) for bottom velocity from beams 1 to 4.which=55
(or"heaving"
for time-integrated,
depth-averaged, vertical velocity (i.e. heaving)which="velocity"
equivalent towhich=1:3
(velocity components)which="amplitude"
equivalent towhich=5:7
(backscatter intensity components)which="quality"
equivalent towhich=9:11
(quality components)which="hydrography"
equivalent towhich=14:15
(temperature and pressure)which="angles"
equivalent towhich=16:18
(heading, pitch and roll) The color scheme for image plots (which
in 1:12) is provided
by the col
argument, which is passed to image
to do the actual plotting. See
A common quick-look plot to assess mooring movement is to use
which=15:18
(pressure being included to signal the tide, and
tidal currents may dislodge a mooring or cause it to settle).
By default, plot.adp
uses a zlim
value for the
image
that is constructed to contain all the data, but
to be symmetric about zero. This is done on a per-panel basis, and
the scale is plotted at the top-right corner, along with the name of
the variable being plotted. You may also supply zlim
as one
of the ...arguments, but be aware that a reasonable limit on
horizontal velocity components is unlikely to be of much use for the
vertical component.
A good first step in the analysis of measurements made from a moored
device (stored in d
, say) is to do plot(d,
which=14:18)
. This shows time series of water properties and
sensor orientation, which is helpful in deciding which data to trim
at the start and end of the deployment, because they were measured
on the dock or on the ship as it travelled to the mooring site.
read.oce
, which
is usually able to detect the type of instrument. If that fails, the
user should try read.adp.rdi
(for RDI files) or
read.adp.nortek
(for NorTek files). These files may be
in beam coordinates, in xyz coordinates, or in enu coordinates. It is
common in a scientific setting to use beam coordinates, and so this
package offers functions beamToXyzAdp
and
xyzToEnuAdp
to take the intermediate steps, and
enuToOtherAdp
to go further, e.g. to rotate into a
coordinate system aligned with the shoreline or with an isobath. The beam stength may be corrected for R-squared spreading with
beamAttenuateAdp
.
Summaries of ADP data are provided by summary.adp
.
ADP data may be plotted with plot.adp
.
library(oce)
data(adp)
plot(adp, which=1:3)
# Illustrate adornment
plot(adp, which=1:2,
adorn=expression({
abline(v=as.POSIXct('2008-06-26 06:00:00',tz='UTC'),col='green',lwd=3)
lines(x$data$ts$time, x$data$ts$pressure, lwd=3, col='blue')
}))
Run the code above in your browser using DataLab