Chapter Contents |
Previous |
Next |
The GCHART Procedure |
Procedure features: |
| ||||||||
Other features: |
| ||||||||
Data set: | TOTALS | ||||||||
Sample library member: | GR13N03 |
In the horizontal bar chart shown above, the summary statistics are printed by default to the right of the bars and display the formatted values of SALES.
The bars use the default pattern fill, which is solid. Because a colors list is specified in the GOPTIONS statement, the first default pattern color is the first color in the list. To avoid having black bars, the program uses a PATTERN statement to specify the pattern color. Using a PATTERN statement causes the default bar outline color to match the fill color. All the bars display the same pattern because by default patterns change for subgroups and in this chart subgroups are not specified.
The output also shows the frame that is drawn by default around the axis area.
The second bar chart is a 3D vertical bar chart, shown in the following output. Vertical bar charts do not generate a table of statistics and by default do not print any chart statistics. This chart uses the same pattern as the horizontal bar chart, but the VBAR3D statement specifies a black outline for the bars.
libname reflib 'SAS-data-library'; goptions reset=global gunit=pct border colors=(black red blue green) cback=white ftitle=swissb ftext=swiss htitle=6 htext=3.5; |
title1 'Total Sales'; footnote1 h=3 j=r 'GR13N03(a) '; |
pattern1 color=red; |
proc gchart data=reflib.totals; format sales dollar8.; hbar site / sumvar=sales; run; |
footnote1 h=3 j=r 'GR13N03(b) '; vbar3d site / sumvar=sales coutline=black; run; quit; |
Chapter Contents |
Previous |
Next |
Top of Page |
Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.