This example shows
how to represent the values of three variables with a twodimensional plot
by setting one of the variables as the CONTOUR variable. The variables X and
Y appear on the axes, and Z is the contour variable. Program statements are
used to generate the observations for the plot, and the following equation
describes the contour surface:
options nodate pageno=1 linesize=64 pagesize=25;
 data contours;
format Z 5.1;
do X=0 to 400 by 5;
do Y=0 to 350 by 10;
z=46.2+.09*x.0005*x**2+.1*y.0005*y**2+.0004*x*y;
output;
end;
end;
run; 
 proc print data=contours(obs=5) noobs;
title 'CONTOURS Data Set';
title2 'First 5 Observations Only';
run; 

CONTOURS Data Set 1
First 5 Observations Only
Z X Y
46.2 0 0
47.2 0 10
48.0 0 20
48.8 0 30
49.4 0 40
 
 options nodate pageno=1 linesize=120 pagesize=60 noovp; 
 proc plot data=contours;
plot y*x=z / contour=10;
title 'A Contour Plot';
run;

The shadings associated with the values of Z appear at the bottom of
the plot. The plotting symbol # shows where high values of Z occur.



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