
3 Graphics
R = sqrt(X.^2 + Y.^2) + e ps;
Z = sin(R)./R;
mesh(X,Y,Z,'EdgeColor','black')
By default, MATLAB colors the m esh using the current colormap. However,
this example uses a single-colored mesh by specifying the
EdgeColor surface
property. See the
surface reference page for a list of all surface properties.
You can create a mesh with see-through faces by disabling hidden line
removal:
hidden off
See the hid den reference page for more information on this option.
Example — Colored Surface Plots
A surface plot is similar to a mesh plot except that MATLAB colors the
rectangular faces of the surface. The co lo r of each face i s determined by the
values of
Z and the colormap (a colormap is an ordered list of colors). The se
statements graph the
sinc function as a surface plot, spe cify a colormap, and
add a color bar to show the mapping of data to color:
3-64
Commenti su questo manuale