Chapter Contents |
Previous |
Next |
The GPLOT Procedure |
Procedure features: |
| |||
Other features: |
| |||
Sample library member: | GR21N08 |
This example then modifies the plot request. As shown in the following output, the plot is enhanced by using different symbol definitions for each plot line, changing axes labels, and scaling the vertical axes differently.
libname reflib 'SAS-data-library'; goptions reset=global gunit=pct border cback=white colors=(black blue green red) ftitle=swissb ftext=swiss htitle=6 htext=3; |
data reflib.citytemp; input month faren city $; datalines; 1 40.5 Raleigh 1 12.2 Minn 1 52.1 Phoenix ...more data lines... 12 41.2 Raleigh 12 18.6 Minn 12 52.5 Phoenix ; |
title1 'Average Monthly Temperature'; footnote1 j=l ' Source: 1984 American Express'; footnote2 j=l ' Appointment Book' j=r 'GR21N08(a) '; |
symbol1 interpol=join value=dot height=3; |
proc gplot data=reflib.citytemp; plot faren*month=city / hminor=0; run; |
footnote2 j=l ' Appointment Book' j=r 'GR21N08(b) '; |
symbol1 color=green interpol=spline width=2 value=triangle height=3; symbol2 color=blue interpol=spline width=2 value=circle height=3; symbol3 color=red interpol=spline width=2 value=square height=3; |
axis1 label=none value=('JAN' 'FEB' 'MAR' 'APR' 'MAY' 'JUN' 'JUL' 'AUG' 'SEP' 'OCT' 'NOV' 'DEC') offset=(2) width=3; axis2 label=('Degrees' justify=right 'Fahrenheit') order=(0 to 100 by 10) width=3; |
legend1 label=none value=(tick=1 'Minneapolis'); |
plot faren*month=city / haxis=axis1 hminor=0 vaxis=axis2 vminor=1 caxis=red legend=legend1; run; quit; |
Chapter Contents |
Previous |
Next |
Top of Page |
Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.