contour#
Purpose#
Graphs a matrix of contour data.
Note
This function is for the deprecated PQG graphics.
Library#
pgraph
Format#
- contour(x, y, z)#
- Parameters:
x (1xK vector) – the X axis data. K must be odd.
y (Nx1 vector) – the Y axis data. N must be odd.
z (NxK matrix) – the matrix of height data to be plotted.
Global Input#
- _plev#
Kx1 vector, user-defined contour levels for contour. Default 0.
Remarks#
A vector of evenly spaced contour levels will be generated automatically
from the z matrix data. Each contour level will be labeled. For
unlabeled contours, use ztics().
To specify a vector of your own unequal contour levels, set the vector
_plev before calling contour().
To specify your own evenly spaced contour levels, see ztics().
Example#
// Create a contour plot of z = x^2 + y^2
x = seqa(-3, 0.5, 13);
y = seqa(-3, 0.5, 13);
z = x' .*. ones(13, 1);
z = z .* z + (ones(1, 13) .*. y) .* (ones(1, 13) .*. y);
contour(x', y, z);
Source#
pcontour.src
See also