Chapter Contents |
Previous |
Next |
The GCONTOUR Procedure |
Procedure features: |
| |||||||||
Sample library member: | GR14N04 |
As shown in the following output, the example then modifies the PLOT statement by specifying the PATTERN option, which uses patterns to distinguish between contour levels. Additional PLOT statement options outline filled areas in gray and specify green text for all text on the axes and in the legend.
Finally, as shown by the following output, the example uses the JOIN option to combine the patterns in grid cells for the same contour level. Additional options enhance the plot by modifying the axes and framing the legend.
libname reflib 'SAS-data-library'; goptions reset=global gunit=pct border cback=white colors=(black blue green red) ftext=swiss ftitle=swissb htitle=6 htext=4; |
data reflib.swirl; do x= -5 to 5 by 0.25; do y= -5 to 5 by 0.25; if x+y=0 then z=0; else z=(x*y)*((x*x-y*y)/(x*x+y*y)); output; end; end; run; |
title 'Simple Contour Plot'; footnote j=r 'GR14N04(a) '; |
proc gcontour data=reflib.swirl; plot y*x=z; run; |
title 'Representing Contour Levels with Patterns'; footnote j=r 'GR14N04(b) '; |
proc gcontour data=reflib.swirl; plot y*x=z / pattern coutline=gray ctext=green; run; |
title 'Joining the Patterns in a Contour Plot'; footnote j=r 'GR14N04(c) '; |
axis1 label=none value=('' ' ' '0' ' ' '5') color=red width=3; axis2 label=none value=('' ' ' '0' ' ' '5') color=red width=3; legend frame; |
proc gcontour data=reflib.swirl; plot y*x=z / pattern join haxis=axis1 vaxis=axis2 legend=legend1; run; quit; |
Chapter Contents |
Previous |
Next |
Top of Page |
Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.