Learn R Programming

oce (version 0.9-3)

oceContour: Contour with ability to flip x and y

Description

This provides something analagous to contour, but with the ability to flip x and y.

Usage

oceContour(x, y, z, revx=FALSE, revy=FALSE, ...)

Arguments

x
values for x grid.
y
values for y grid.
z
matrix for values to be contoured. The first dimension of z must equal the number of items in x, etc.
revx
set to TRUE to reverse the order in which the labels on the x axis are drawn
revy
set to TRUE to reverse the order in which the labels on the y axis are drawn
...
optional arguments passed to plotting functions.

Details

Setting revy=TRUE can be helpful if the y data represent pressure or depth below the surface.

Examples

Run this code
library(oce)
data(topoWorld)
## coastline now, and in last glacial maximum
lon <- topoWorld[["longitude"]]
lat <- topoWorld[["latitude"]]
z <- topoWorld[["z"]]
oceContour(lon, lat, z, levels=0, drawlabels=FALSE)
oceContour(lon, lat, z, levels=-130, drawlabels=FALSE, col='blue', add=TRUE)

Run the code above in your browser using DataLab