image-methods: Plot a 'fvcom.grid' instance as a heatmap.

Description Arguments Examples

Description

Given a vector of data, this function plots the data as a heatmap on an unstructured grid. The length of the data vector must be as long as either the number nodes in the grid or the number of elements in the grid. The grid is currently stored as a data.frame, but will be converted to an S4 object in the future.

Arguments

x

A fvcom.grid instance.

z

A vector to plot as a heatmap.

units

Either 'll' for latitude and longitude or 'm' for meters.

col

A list of colors, such as that returned by bathy.colors.

add

Should the plot be added to the current plot? #'

xlim

x-limits for the plot.

ylim

y-limits for the plot.

zlim

z-limits for the plot.

border.col

Color of the element borders. If not provided the borders will be colored to match the adjacent polygons.

border.lwd

Line width of the element borders.

bg.col

Color of the background. The background is only plotted if add=F, otherwise bg.col is ignored.

Examples

1
2
3
4
5
6
7
8
{
  op = par(ask=TRUE)
  # Plot the grid in a single color
  image(ocean.demo.grid, col='white')
  # Plot the grid in bathy colors
  image(ocean.demo.grid)
  par(op)
}

ocean documentation built on Jan. 15, 2017, 4:16 p.m.

Related to image-methods in ocean...