Surface Plots
You can create surface plots of your data using the SURFACE and ISURFACE procedures. Keywords to these routines allow you to add titles, change the range and type of axes used, and customize your plots in other ways. This section describes:
Creating Surface Plots with SURFACE
The call to SURFACE establishes the plot window (the rectangular area enclosed by the axis), the plot region (the box enclosing the plot window and its annotation), the axis types (linear or logarithmic), and the scaling. Data variables are then plotted within the plot window.
To create a simple surface representation of elevation data, do the following:
- Restore the
marbells.datfile, creating an array variable namedelev: - Resample the
elevvariable. The CONGRID function creates a 35 by 45 element array from the original 350 by 450 element array); this will make the grid easier to see in our surface visualization. - Call the SURFACE procedure:
RESTORE, FILEPATH('marbells.dat', SUBDIRECTORY=['examples', 'data'])
marbells = CONGRID(elev, 35, 45)

Axis Orientation
You can modify the orientation of the axes using AX and AZ keywords to SURFACE. For example, the following command rotates the X-Y plane of the plot to 60 degrees from horizontal, and rotates the Y-Z plane of the plot to 20 degrees from straight toward the viewer:
SURFACE, marbells, AX=60, AZ=20

Shaded Surfaces
To create a shaded surface, use the SHADE_SURF procedure. SHADE_SURF and its parameters are similar to SURFACE, but it renders the visible surface as a shaded image rather than a mesh.
For example, to create a light-source shaded surface:
SHADE_SURF, marbells, AZ=20, CHARSIZE=1.5, $
TITLE='Light-source Shaded Surface'

Creating Surface Plots with ISURFACE
The
ISURFACE procedure uses the IDL iTools framework to display surface plots in an interactive window rather than as a static display. To replicate the above example using ISURFACE and the full elev dataset:

Note that ISURFACE creates a shaded surface by default. To create a wire mesh surface similar to that drawn by the SURFACE routine, double-click on the surface to display the property sheet and "Wire Mesh" as the Surface Style. Alternately, use the STYLE keyword to ISURFACE:
(Here, we used the reduced data set to make it easier to see the mesh lines.) Note that you can rotate the surface interactively by selecting the Rotate manipulator.

Further Information
For additional information on surface plotting, see
- SURFACE in the IDL Reference Guide
- SHADE_SURF in the IDL Reference Guide
- ISURFACE in the IDL Reference Guide
- Working with Surfaces in the iTool User's Guide