3-D Visualization    

Representing a Matrix as a Surface

MATLAB defines a surface by the z-coordinates of points above a rectangular grid in the x-y plane. The plot is formed by joining adjacent points with straight lines. Surface plots are useful for visualizing matrices that are too large to display in numerical form and for graphing functions of two variables.

MATLAB can create different forms of surface plots. Mesh plots are wire-frame surfaces that color only the lines connecting the defining points. Surface plots display both the connecting lines and the faces of the surface in color. This table lists the various forms.

Function
Used to Create

mesh, surf

Surface plot

meshc, surfc

Surface plot with contour plot beneath it

meshz

Surface plot with curtain plot (reference plane)

pcolor

Flat surface plot (value is proportional only to color)

surfl

Surface plot illuminated from specified direction

surface

Low-level function (on which high-level functions are based) for creating surface graphics objects


  Line Plots of 3-D Data Mesh and Surface Plots