surfc
Draws a 3-D surface with a contour plot underneath.
Category: Graphics > 2-D and 3-D Plots
Syntax
surfc(Z)
Draws the surface with heights Z, plus contours below.
surfc(X, Y, Z)
Uses X and Y as coordinates.
surfc(___, Name, Value)
Sets surface properties.
h = surfc(___)
Returns handles to the surface and the contour.
Description
The contour lines are drawn on the lower face of the axes box, so the plot shows the shape of the surface and its level curves together. This helps locate peaks and valleys by their position in the plane.
Input arguments
X, Y, Z, C- The same arguments as
surf.
Output arguments
h- Handles of the graphics objects created.
Example
Peaks with contours
[X, Y, Z] = peaks(20);
surfc(X, Y, Z)
In the app, the figure is drawn below the code.