Learn R Programming

oce (version 0.2-1)

plot.pt: Plot pt (pressure-temperature) recorder data

Description

Plot pt temperature-depth recorder data

Usage

## S3 method for class 'pt':
plot(x,
     which=1:4, title="", adorn=NULL,
     tlim, plim, Tlim, 
     xlab, ylab,
     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"),
     ...)

Arguments

x
pt object, typically result of read.pt.
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.
title
character string to be used in the text-summary panel (which=2)
adorn
list of expressions to be executed for the panels in turn, e.g. to adorn the plots. If the number matches the number of panels, then the strings are applied to the appropriate panels, as they are drawn from top-left to bottom-right. If only
tlim
optional limits for time axis. If not provided, the value will be inferred from the data.
plim
optional limits for pressure axis. If not provided, the value will be inferred from the data. (It is helpful to specify this, if the auto-scaled value will be inappropriate, e.g. if more lines are to be added later.)
Tlim
optional limits for temperature axis. If not provided, the value will be inferred from the data. (It is helpful to specify this, if the auto-scaled value will be inappropriate, e.g. if more lines are to be added later.)
xlab
optional label for x axis.
ylab
optional label for y axis.
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.
abbreviateTimeRange
boolean that applies to panels with time as the horizontal axis, indicating whether to abbreviate the second time in the time range (e.g. skipping the year, month, day, etc. if it's the same as the start time).
useSmoothScatter
a boolean to cause smoothScatter to be used for profile plots, instead of plot.
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").
main
main title for plot, used just on the top panel, if there are several panels.
debug
a flag that turns on debugging, if it exceeds 0.
...
optional arguments passed to plotting functions.

Details

Several plots are available.
  • which=1or"temperature"for a time-series plot of temperature
  • which=2or"text"for textual information about the dataset
  • which=3or"pressure"for a time-series plot of pressure
  • which=4or"profile"for a temperature ``profile''

See Also

See read.pt for more information on dealing with the pt data type, including examples.

Examples

Run this code
data(ptr)
plot(ptr, which=c(1,3), 
 adorn=expression({abline(v=as.POSIXct('2008-07-04 20:00:00',tz='UTC'))}))

Run the code above in your browser using DataLab