Chapter Contents |
Previous |
Next |
The CHART Procedure |
PROC CHART is a useful tool to visualize data quickly, but if you need
to produce presentation-quality graphics that include color and various fonts,
you can use SAS/GRAPH software. The GCHART procedure in
SAS/GRAPH
software produces the same types of charts as PROC CHART does. In addition,
PROC GCHART can produce donut charts.
The following sections explain the different types of charts that PROC CHART can produce. All of the charts illustrate the results from a multiple-choice survey of 568 people, with five possible responses that range from "always" to "never."
About Bar Charts |
Vertical Bar Chart shows a vertical bar chart that displays the number of responses for the five categories from the survey data. The following statements produce the output:
options nodate pageno=1 linesize=80 pagesize=30; proc chart data=survey; vbar response / sumvar=count midpoints='Always' 'Usually' 'Sometimes' 'Rarely' 'Never'; run;
Horizontal Bar Chart shows the same data presented in a horizontal bar chart. The two types of bar charts have essentially the same characteristics, except that horizontal bar charts by default display a table of statistic values to the right of the bars. The following statements produce the output:
options nodate pageno=1 linesize=80 pagesize=60; proc chart data=survey; hbar response / sumvar=count midpoints='Always' 'Usually' 'Sometimes' 'Rarely' 'Never'; run;
About Block Charts |
options nodate pageno=1 linesize=80 pagesize=30; proc chart data=survey; block response / sumvar=count midpoints='Always' 'Usually' 'Sometimes' 'Rarely' 'Never'; run;
About Pie Charts |
options nodate pageno=1 linesize=80 pagesize=35; proc chart data=survey; pie response / sumvar=count; run;
About Star Charts |
options nodate pageno=1 linesize=80 pagesize=60; proc chart data=survey; star response / sumvar=count; run;
Chapter Contents |
Previous |
Next |
Top of Page |
Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.