locations of grid lines at which the values in z are
measured. These must be in ascending order. By default, equally
spaced values from 0 to 1 are used. If x is a list,
its components x$x and x$y are used for x
and y, respectively. If the list has component z this
is used for z.

z

a matrix containing the values to be plotted (NAs are
allowed). Note that x can be used instead of z for
convenience.

nlevels

number of contour levels desired ifflevels is not supplied.

levels

numeric vector of levels at which to draw contour
lines.

Value

A list of contours.
Each contour is a list with elements:

level

The contour level.

x

The x-coordinates of the contour.

y

The y-coordinates of the contour.

Details

contourLines draws nothing, but returns a set of contour lines.

There is currently no documentation about the algorithm.
The source code is in R_HOME/src/main/plot3d.c.

See Also

options("max.contour.segments") for the maximal
complexity of a single contour line.