ezmeshc

Mesh surface plot with a contour plot underneath, from a function handle or expression.

Category: Graphics > 2-D and 3-D Plots

Syntax

ezmeshc(f)

Draws z = f(x,y) as a mesh with its contour lines projected below, over the default domain -2*pi to 2*pi.

ezmeshc(f, domain)

Restricts the plot to [min max] or [xmin xmax ymin ymax].

h = ezmeshc(___)

Also returns the handles of the surface and the contour.

Description

It is ezmesh plus a contour drawn on the floor of the axes, which helps to read heights off the surface. The equivalent call with current functions is meshc on a grid built with meshgrid.

Input arguments

f
Function handle or character vector in x and y.
domain
Two or four numbers that set the plotting region.

Output arguments

h
Array of two graphics handles: the mesh and the contour.

Example

Mesh with contours

ezmeshc(@(x,y) sin(x).*cos(y), [-pi pi])

In the app, the figure is drawn below the code.

See also

ezmesh meshc ezsurfc fmesh