Contour Plots
You can create surface plots of your data using the CONTOUR and ICONTOUR 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 Contour Plots with CONTOUR
The call to CONTOUR 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 contour 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)

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

Creating a Composite Plot with SHOW3
The SHOW3 procedure combines a contour plot, a surface plot, and an image in a single display:

Further Information
For additional information on contour plotting, see
- CONTOUR in the IDL Reference Guide
- ICONTOUR in the IDL Reference Guide
- SHOW3 in the IDL Reference Guide
- Working with Contours in the iTool User's Guide