Learn R Programming

oce (version 0.8-10)

plotProfile: Plot a CTD profile of various quantities

Description

Plot a CTD profile, in any of several common formats.

Usage

plotProfile(x,
             xtype="salinity+temperature", 
             ytype=c("pressure", "z", "sigmaTheta"),
             eos=getOption("eos", default='unesco'),
             xlab=NULL, ylab=NULL,
             col.salinity="darkgreen",
             col.temperature="red",
             col.rho="blue",
             col.N2="brown",
             col.dpdt="darkgreen",
             col.time="darkgreen",
             grid=TRUE,
             col.grid="lightgray",
             lty.grid="dotted",
             Slim, Tlim, densitylim, N2lim, dpdtlim, timelim, ylim,
             lwd=par("lwd"),
             xaxs="r", yaxs="r",
             cex=1, pch=1,
             useSmoothScatter=FALSE,
	     keepNA=FALSE,
             type='l',
             mgp=getOption("oceMgp"),
             mar=c(1 + if (length(grep('\\+', xtype))) mgp[1] else 0, mgp[1]+2, mgp[1] + 2, 2),
             inset=FALSE,
             debug=getOption("oceDebug"),
             ...)

Arguments

x
A cdt object, e.g. as read by read.ctd.
xtype
Item(s) plotted on the x axis, from the list below. [object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
ytype
variable to use on y axis.
eos
name of equation of state to be used, either "unesco" or "teos". If the latter, then the computer must have the TEOS library installed; see teos.
xlab
optional label for x axis
ylab
optional label for y axis
col.salinity
color for salinity profile (see Details).
col.temperature
color for temperature (see Details).
col.rho
color for density (see Details).
col.N2
color for square of buoyancy frequency (see Details).
col.dpdt
color for dP/dt.
col.time
color for delta-time.
grid
logical, set to TRUE to get a grid.
col.grid
colour for grid.
lty.grid
line type for grid.
Slim
Optional limit for S axis
Tlim
Optional limit for T axis
densitylim
Optional limit for density axis
N2lim
Optional limit for N2 axis
dpdtlim
Optional limit for dp/dt axis
timelim
Optional limit for delta-time axis
ylim
Optional limit for y axis
lwd
lwd value for data line
xaxs
value of par xaxs to use
yaxs
value of par yaxs to use
cex
size to be used for plot symbols (see par)
pch
code for plotting symbol (see par).
useSmoothScatter
boolean, set to TRUE to use smoothScatter instead of plot to draw the plot.
keepNA
FALSE
type
type of plot to draw, using the same scheme as 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").
inset
set to TRUE for use within plotInset. The effect is to prevent the present function from adjusting margins, which is necessary because margin adjustment is the basis for the meth
debug
a flag that turns on debugging, if it exceeds 0.
...
Optional arguments passed to other functions. A common example is to set df, for use in swN2 calculations.

Value

  • None.

Details

The colours (col.salinity, etc.) are ony used if two profiles appear on a plot.

See Also

read.ctd scans ctd information from a file, and plotTS plots a temperature-salinity diagram.

Examples

Run this code
library(oce)
data(ctd)
plotProfile(ctd, xtype="temperature")

Run the code above in your browser using DataLab