Chapter Contents

Previous

Next
The GPLOT Procedure

Example 7: Filling Areas in an Overlay Plot


Procedure features:
PLOT statement options:
AREAS=
OVERLAY
Other features:
GOPTIONS statement
SYMBOL statement
Data set: REFLIB.STOCKS
Sample library member: GR21N07

[IMAGE]

This example uses the AREAS= option in the PLOT statement to fill the areas that are under the plot lines. As in the previous example, two plots are overlaid on the same graph.
 Note about code
libname reflib 'SAS-data-library';
goptions reset=global gunit=pct border cback=white
         colors=(blue red) ctext=black
         ftitle=swissb ftext=swiss htitle=6 htext=4;
 Note about code
title1 'Dow Jones Yearly Highs and Lows';
footnote1 h=3 j=l ' Source: 1997 World Almanac'
          j=r 'GR21N07 ';
 Note about code
symbol1 interpol=join;
 Note about code
axis1 order=(1955 to 1995 by 5) offset=(2,2)
      label=none
      major=(height=2)
      minor=(height=1);
axis2 order=(0 to 6000 by 1000) offset=(0,0)
      label=none
      major=(height=2)
      minor=(height=1);
 Note about code
proc gplot data=reflib.stocks;
   plot low*year high*year / overlay
                             haxis=axis1
                             hminor=4
                             vaxis=axis2
                             vminor=1
                             caxis=black
                             areas=2;
run;
quit;


Chapter Contents

Previous

Next

Top of Page

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