Plot a contour graph under mesh graph

`meshc(X,Y,Z)`

meshc(Z)

meshc(...,C)

meshc(axes_handles,...)

h = meshc(...)

`meshc(X,Y,Z)`

draws a wireframe
mesh and a contour plot under it with color determined by `Z`

,
so color is proportional to surface height. If `X`

and `Y`

are
vectors, `length(X) = n`

and ```
length(Y) =
m
```

, where `[`

`m,n] = size(Z)`

.
In this case, `(`

*X*`(`

`j`

`)`

, *Y*`(`

`i`

`)`

, *Z*`(`

`i`

`,`

`j`

`))`

are
the intersections of the wireframe grid lines; `X`

and `Y`

correspond
to the columns and rows of `Z`

, respectively. If `X`

and `Y`

are
matrices, `(`

*X*`(`

`i`

`,`

`j`

`)`

, *Y*`(`

`i`

`,`

`j`

`)`

, *Z*`(`

`i`

`,`

`j`

`))`

are
the intersections of the wireframe grid lines.

`meshc(Z)`

draws a contour
plot under wireframe mesh using `X = 1:n`

and ```
Y
= 1:m
```

, where `[m,n] = size(Z)`

. The height, `Z`

,
is a single-valued function defined over a rectangular grid. Color
is proportional to surface height.

`meshc(...,C)`

draws a `meshc`

graph
with color determined by matrix `C`

. MATLAB^{®} performs
a linear transformation on the data in `C`

to obtain
colors from the current colormap. If `X`

, `Y`

,
and `Z`

are matrices, they must be the same size
as `C`

.

`meshc(axes_handles,...)`

plots
into the axes with handle `axes_handle`

instead of
the current axes (`gca`

).

`h = meshc(...)`

returns
handles to the Chart Surface Properties and Contour Properties graphics object.

`axis`

|`caxis`

|`colormap`

|`contour`

|`hidden`

|`hold`

|`mesh`

|`meshgrid`

|`meshz`

|`shading`

|`surf`

|`surface`

|`surfc`

|`surfl`

|`view`

|`waterfall`

Was this topic helpful?