3-D Visualization Previous page   Next Page

Example -- Displaying Cross-Sections of Surfaces

Sometimes projecting a 3D surface onto an x-, y-, or z-axis can aid visualization. To do this, you might change the aspect ratio, in order to make space for the projection. The following example illustrates how to do this:

  1. Create an x-y grid and z-values for it:
  2. Plot the surface in 3-D; annotate with a colorbar and axis labels:
  3. Use axis to change the Ymax value in to 3, stretching the plot in one direction:
  4. Regrid the surface, setting all Y-values equal to 3:
  5. Plaster a plot of the surface onto the Y-axis:

Previous page  Effects of Setting Aspect Ratio Properties Example -- Displaying Real Objects Next page

© 1994-2005 The MathWorks, Inc.