Learn R Programming

oce (version 0.1.69)

plot.section: Plot a CTD section

Description

Plot a CTD section.

Usage

## S3 method for class 'section':
plot(x,
 	field=NULL,
	at=NULL,
	labels=TRUE,
	grid=FALSE,
	col.grid="lightgray",
	station.indices,
	coastline=NULL,
	map.xlim=NULL,
	\dots)

Arguments

x
a section object, e.g. as created by make.section.
field
is the field to plot. Common options are "temperature", "salinity", and "density", although plot.section will accept any named field that is present in the constituent CTD profiles. If NULL
at
if NULL (the default), the x axis will indicate the distance of the stations from the first in the section. (This may give errors in the contouring routine, if the stations are not present in a geographical order.) If a list, then it indica
labels
either a logical, indicating whether to put labels on the x axis, or a vector that is a list of labels to be placed at the x positions indicated by at.
grid
if TRUE, grid lines will be drawn on plots.
col.grid
color of grid lines.
station.indices
optional list of the indices of stations to use. Note that these are indices, not the names of stations, e.g. to focus on the first four stations, use station.numbers=c(1,4).
coastline
optional coastline to be used in a station map
map.xlim
optional xlim for station location, which can be helpful in ensuring that a recognizable coastline can be seen
...
optional arguments passed to the contouring function, e.g. using labcex=1 will increase the size of contour labels. Probably the most common use, though, is to specify contours for individually plotted fields, e.g. plot.section(s

Value

  • None.

Details

Creates a summary plot for a CTD section. If a field is supplied, then just that single field is contoured. If no field is supplied, then temperature, salinity, and sigma are contoured. A location plot is also drawn if a coastline is provided; in this, the first station in the section is indicated with a different symbol than the rest.

The y-axis for the contours is pressure, plotted in the conventional reversed form, so that the water surface appears at the top of the plot. The x-axis is more complicated. If at is not supplied, then the routine calculates x as the distance between the first station in the section and each of the other stations. (This will produce an error if the stations are not ordered geographically, because the contour routine cannot handle non-increasing axis coordinates.) If at is specified, then it is taken to be the location, in arbitrary units, along the x-axis of labels specified by labels; the way this works is designed to be the same as for axis.

See Also

Sections may be created with make.section or read.section, and may be summarized with summary.section.

Examples

Run this code
library(oce)
# Halifax Harbour
data(section)
data(coastline.halifax)
plot(section, coastline=coastline.halifax)
# Gulf Stream
# File source -- http://cchdo.ucsd.edu/data_access?ExpoCode=90CT40_1
# a03 <- read.section("a03_hy1.csv")
data(a03)
a03g <- section.grid(a03, p=seq(0,2000,10))
data(coastline.world)
# Select the Gulf Stream region
plot(a03g,station.indices=seq(124,102),coastline=coastline.world,map.xlim=c(-80,-60))

Run the code above in your browser using DataLab