plot(as.ctd(rsk))
if the object contains CTD-like data. Other times,
users should extract data from the rsk
object and construct plots
themselves. The idea is to use the present function mainly to get an overview,
and for that reason, the default plot type (set by which
) is a set of
time-series plots, because the one thing that is definitely known about
rsk
objects is that they contain a time
vector in their
data
slot.
"plot"(x, which = "timeseries", adorn = NULL, tlim, ylim, xlab, ylab, tformat, drawTimeRange = getOption("oceDrawTimeRange"), abbreviateTimeRange = getOption("oceAbbreviateTimeRange"), useSmoothScatter = FALSE, mgp = getOption("oceMgp"), mar = c(mgp[1] + 1.5, mgp[1] + 1.5, 1.5, 1.5), main = "", debug = getOption("oceDebug"), ...)
rsk
object, typically result of read.rsk
.which
.expression
or vector of expressions that contain
R code that is to be executed immediately after each panel of the plot.
If the number of expressions matches the number of panels, then the
expressions are used for the corresponding panels; otherwise, the
expression list is extended to match the number of panels (i.e.
to obtain length(which)
elements). Note that adorn
is a dangerous argument, because if the expressions contained
therein set up local storage, there is a chance of entirely
disrupting the plotting. For this reason, adorn
was
marked as defunct in June 2016, and will be removed entirely
after the July CRAN release. Users with existing code that uses
adorn
should simply plot the panels individually, and
use conventional R functions, e.g. lines
etc.,
after each panel, to achieve the desired effect. (See
oce-defunct
for notes on other deprecated or
defunct oce
features.)length(which) == 1
and which
corresponds to one of the data fields. If a multipanel plot of
a specific subset of the data fields is desired with
ylim
control, it should be done panel by panel (see
Examples).oce.plot.ts
, for plot
types that call that function. (See strptime
for the format
used.)smoothScatter
to be
used for profile plots, instead of plot
.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")
.which="timeseries"
plots all data
fields, and over-rides any other specification. Specific fields
can be plotted by naming the field,
e.g. which="temperature"
to plot a time series of just
the temperature field.
rsk-class
explains the structure of
rsk
objects, and also outlines the other functions dealing with them.Other functions that plot oce
data: 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,lisst-method
,
plot,lobo-method
,
plot,met-method
,
plot,odf-method
,
plot,satellite-method
,
plot,sealevel-method
,
plot,section-method
,
plot,tidem-method
,
plot,topo-method
,
plot,windrose-method
,
plotProfile
, plotScan
,
plotTS
, tidem-class
Other things related to rsk
data: [[,rsk-method
,
[[<-,rsk-method
, as.rsk
,
read.rsk
, rsk-class
,
rskPatm
, rskToc
,
rsk
, subset,rsk-method
,
summary,rsk-method
library(oce)
data(rsk)
plot(rsk) # default timeseries plot of all data fields
## A multipanel plot of just pressure and temperature with ylim
par(mfrow=c(2, 1))
plot(rsk, which="pressure", ylim=c(10, 30))
plot(rsk, which="temperature", ylim=c(2, 4))
Run the code above in your browser using DataLab