ezsurfc
Shaded surface plot with a contour plot underneath, from a function handle or expression.
Category: Graphics > 2-D and 3-D Plots
Syntax
ezsurfc(f)
Draws z = f(x,y) as a surface with its contour lines below, over the default domain -2*pi to 2*pi.
ezsurfc(f, domain)
Restricts the plot to [min max] or [xmin xmax ymin ymax].
h = ezsurfc(___)
Also returns the handles of the surface and the contour.
Description
It combines ezsurf with a contour projected on the floor of the plot. The same picture can be built with surfc after meshgrid.
Input arguments
f- Function handle or character vector in
xandy. domain- Two or four numbers that set the plotting region.
Output arguments
h- Array of two graphics handles: the surface and the contour.
Example
Surface with contours
ezsurfc(@(x,y) x.*exp(-x.^2 - y.^2), [-2 2])
In the app, the figure is drawn below the code.