lines-methods: Plot an instance of the 'fvcom.grid' class and overlay the...

Description Arguments Examples

Description

Plot an instance of the fvcom.grid class and overlay the trajectories given by xy.

Arguments

x

A fvcom.grid instance

xy

A list with matrices x and y components that contain the trajectories to plot. The columns of xy$x are plotted against the columns of xy$y, so each particle trajectory should be in a column and each time index in a row.

plot.units

The units for plotting. Either 'm' for meters or 'll' for latitude and longitude.

xy.units

The units of xy. Either 'm' for meters or 'll' for latitude and longitude.

...

Additional arguments to be passed to matlines.

Examples

1
2
3
4
5
6
7
8
{
# Create a set of random trajectories.
nodes = get.nodes(ocean.demo.grid)
set.seed(1)
x = apply(matrix(rnorm(1000, 0, 0.01), 250), 2, cumsum) - 69.5
y = apply(matrix(rnorm(1000, 0, 0.01), 250), 2, cumsum) + 42.5
lines(ocean.demo.grid, list(x=x, y=y), lty=1)
}

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

Related to lines-methods in ocean...