SAC Command Reference Manual

CONTOUR

SUMMARY

Produces contour plots of data in memory.

SYNTAX

CONTOUR {ASPECT ON|OFF}

INPUT

ASPECT {ON}:Turn aspect ratio option on. When this option is on, the viewport of the contour plot will be adjusted to maintain the y to x aspect ratio of the data.
ASPECT OFF:Turn aspect ratio option off. When off, the full viewport is used.

DEFAULT VALUES

CONTOUR  ASPECT  OFF

DESCRIPTION

This command can be used to produce a contour plot of the of any other two-dimensional array data, including the output of the SPECTROGRAM command. The SAC data plotted by this command must of of file type XYZ (SAC header variable IFTYPE set to IXYZ). Several commands control how the data is displayed: ZLEVELS for the spacing and number of contour levels, ZLINES for linestyles, ZLABELS for contour labeling, ZTICKS for directional tick marks, and ZCOLORS for line colors. Depending upon the contouring options selected, two different contouring algorithms are used. A fast scan method is used if no only solid linestyles are selected and no tick marks or labels are requested. Otherwise, a slower method, where entire line segments are first assembled before they are drawn, is used. You may want to use the fast scan method for a quick look at your data and then select other options for a final version.

EXAMPLES

In the first example (shown below) a file is read and contoured using default values.

In this example, the same file is read and the header is listed to determine the range of the z data (DEPMIN and DEPMAX.) Only selected portions of the output from LISTHDR are shown. A range of contour levels between 700 km and 1150 km and an increment of 25 km is selected. A list of four linestyles is selected, starting with a solid line. The list will be repeated for every four contour levels. A title is defined and the contour plot was generated:

SAC> READ MYDATA
SAC> LISTHDR
   FILE: MYDATA
        NPTS = 10000
      IFTYPE = GENERAL XYZ (3-D) FILE
      DEPMIN = 697.71
      DEPMAX = 1154.4
      NXSIZE = 100
    XMINIMUM = 82574.
    XMAXIMUM = 86992.
      NYSIZE = 100
    YMINIMUM = 0.47439E+06
    YMAXIMUM = 0.47720E+06
SAC> ZLEVELS RANGE 700 1150 INCREMENT 25
SAC> ZLINES LIST 1 2 3 4
SAC> TITLE 'Katmai topography from survey data [inc = 25 km]'
SAC> CONTOUR

The result of this example is shown in the figure below.

In the final example, the same data is used but different display options are selected. Integer labels are selected for every fourth contour level and "down" tick marks are selected for the contour levels in between. Solid linestyles are used for all contour levels:

SAC> READ MYDATA
SAC> ZLEVELS RANGE 700 1150 INCREMENT 25
SAC> ZLABELS ON LIST INT OFF OFF OFF
SAC> ZTICKS ON LIST 0 -1 -1 -1
SAC> ZLINES LIST 1
SAC> TITLE 'Katmai topography from survey data [labels and ticks]'
SAC> CONTOUR

The result of this example is shown in the figure below.

HEADER VARIABLES

REQUIRED:IFTYPE (set to "IXYZ"), NXSIZE, NYSIZE
USED:XMINIMUM, XMAXIMUM, YMINIMUM, YMAXIMUM

ACKNOWLEDGEMENTS

The fast scan contouring subroutine was developed by Dave Harris (DBH).

LATEST REVISION

JULY 22, 1991 (Version 10.6d)