<< contour Graphics functions cool >>

contour3


Contour 3D plot of matrix


Syntax


contour3(Z)
contour3(X, Y, Z)
contour3(..., levels)
contour3(..., LineSpec)
contour3(ax, ...)
M = contour3(...)
[M, h] = contour3(...)

Input argument


X

x-coordinates: vector or matrix.

Y

y-coordinates: vector or matrix.

Z

z-coordinates: vector or matrix.

levels

Contour levels: scalar or vector.

LineSpec

Line style and color

ax

a scalar graphics object value: parent container, specified as a axes.

Output argument


M

Contour matrix.

h

a graphics object: contour type.

Description


contour3(Z) generates a 3-D contour plot illustrating the isolines of the matrix Z, where Z represents heights on the x-y plane.

The x and y coordinates in the plane correspond to the column and row indices of Z, respectively.

To specify the x and y coordinates for Z values, use contour3(X,Y,Z).

Example


f = figure();
[X,Y,Z] = sphere(50);
[M, C ]= contour3(X,Y,Z);
C.LineWidth = 3;

See also


contour, surf, mesh.

History


Version Description
1.3.0 initial version

Author


Allan CORNET

<< contour Graphics functions cool >>