surfacePlot: Generate a contour or image

Description Usage Arguments See Also Examples

Description

This function generates a contour plot or an images (surface plot). The most frequent application of this function is surface nutrient data. surfacePlot can handle multiple measurements or variables at once. You can choose between a surface plot, a contour plot, or both. The surface plot uses a colour-blind-friendly palette taken from the oce package.

Usage

1
2
surfacePlot(depth_column, latitude, longitude, measurements, plot_depth,
  surface = T, contour = F)

Arguments

depth_column

Depth (or pressure) values.

latitude

Latitude coordinates.

longitude

Longitude coordinates.

measurements

The measurements to plot. If you have multiple variables they should be presented in columns or a dataframe.

plot_depth

The lower limit of the surface plot. Currently this function will plot between the surface and whatever depth is input.

surface

Do you want to make a surface plot?

contour

Do you want to make a contour plot?

See Also

This function relies on the interpBarnes function from the oce package: https://cran.r-project.org/web/packages/oce/oce.pdf.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
library(oceanchemistry)

data("greenland", package = "oceanchemistry")
head(greenland)

surfacePlot(greenland$Depth,
     greenland$Latitude,
     greenland$Longitude,
     data.frame(greenland$`NO2 + NO3 [umol/lg]`),
     plot_depth = 10)

MattForsyth/oceanchemistry documentation built on May 25, 2019, 12:23 p.m.