Learn R Programming

oce (version 0.8-3)

plot.drifter: Plot drifter data

Description

Plot a summary diagram for drifter data.

Usage

## S3 method for class 'drifter':
plot(x, which = 1, level, coastline,
                          cex=1, pch=1, type='p', col,
                          adorn=NULL,
                          mgp=getOption("oceMgp"),
                          mar=c(mgp[1]+1,mgp[1]+1,mgp[1]+1,mgp[1]+1),
                          debug=getOption("oceDebug"), ...)

Arguments

x
A drifter object, e.g. as read by read.drifter.
which
list of desired plot types.
  • which=1orwhich="trajectory"gives a plot of the drifter trajectory, with the coastline, if one is provided.
  • which=2gives a time series of salinity at the in
level
level to plot, for e.g. which=2 and higher. May be an integer, in which case it refers to an index of depth (1 being the top) or it may be the string "all" which means to plot all data.
coastline
optional coastline file, to be drawn if which=1.
cex
size of plotting symbols to be used if type='p'.
pch
type of plotting symbols to be used if type='p'.
type
plot type, either "l" or "p".
col
optional list of colours for plotting.
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 onl
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").
debug
debugging flag
...
optional arguments passed to plotting functions.

Value

  • None.

Details

Creates a summary plot for a drifter dataset.

References

http://www.argo.ucsd.edu/

See Also

The documentation for drifter-class explains the structure of drifter objects, and also outlines the other functions dealing with them.

Examples

Run this code
library(oce)
d <- read.drifter("/data/OAR/6900388_prof.nc")
data(coastlineWorld)
plot(d, which="trajectory", coastline=coastlineWorld)

Run the code above in your browser using DataLab