Chapter Contents

Previous

Next
The GCONTOUR Procedure

Concepts


Parts of a Contour Plot

Some terms used in the discussion of the GCONTOUR procedure are illustrated in GCONTOUR Procedure Terms.

GCONTOUR Procedure Terms

[IMAGE]


About the Input Data Set

The GCONTOUR procedure requires data sets that include three numeric variables: x and y for the horizontal and vertical axes, respectively, and z for the contour level. The observations in the input data set should form a rectangular grid of x and y values and exactly one z value for each x, y combination. For example, data that contain 5 distinct values of x and 10 distinct values for y should be part of a data set that contains 50 observations with values for x, y, and z. If a single x, y grid location has more than one associated z value, only the last such observation is used.


Interpolating Additional Values

Data sets often contain so few combinations of x, y, and z values that the GCONTOUR procedure cannot produce a contour plot. By default, the data set must contain nonmissing z values for at least 50 percent of the grid in order for the GCONTOUR procedure to produce a satisfactory plot. If your data are clustered in relatively small patches over a larger study area, you can use the PROC GCONTOUR statement's INCOMPLETE option, which allows plotting of data when over 50 percent of the plot grid contains missing data.

When the GCONTOUR procedure cannot produce a satisfactory contour plot because of missing x, y, or z values, SAS/GRAPH software issues an error message, and no graph is produced. To correct this problem, you can use the G3GRID procedure to process data sets to be used by the GCONTOUR procedure. The G3GRID procedure interpolates the necessary values to produce a data set with nonmissing z values for every combination of the x and y variables. The G3GRID procedure can also smooth data for use with the GCONTOUR procedure. You can use the output data set from the G3GRID procedure as the input data set for the GCONTOUR procedure. For an example of using PROC G3GRID to interpolate values, see Generating a Simple Contour Plot.


Chapter Contents

Previous

Next

Top of Page

Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.