SAS OnlineTutor HomeFAQ PageSuggested Learning PathsContents+Searchback||next

Creating Bar and Pie Charts
Specifying the Chart Type and Variables


Default Statistics for Charts

The type of chart determines the statistics displayed.

By default, PROC GCHART displays the FREQ (frequency) of the chart variable. The following program creates a pie chart that displays the frequency of the variable ActLevel.

     proc gchart data=clinic.admit;
        pie actlevel;
     run;

Pie chart example.

For horizontal bar charts, unless otherwise specified, PROC GCHART also displays the statistics CFREQ (cumulative frequency), PERCENT (percentage), and CPERCENT (cumulative percentage).

The following program creates a horizontal bar chart of the variable Company. Notice the four default statistics for this type of chart.

     proc gchart data=clinic.insure;
        hbar company;
     run;

Horizontal bar chart.


back||next


Copyright © 2002 SAS Institute Inc., Cary, NC, USA. All rights reserved.

Terms of Use & Legal Information | Privacy Statement