Chapter Contents

Previous

Next
The CHART Procedure

Example 1: Producing a Simple Frequency Count


Procedure features:
VBAR statement

This example produces a vertical bar chart that shows a frequency count for the values of the chart variable.


Program

options nodate pageno=1 linesize=80 pagesize=60;
 Note about code
data shirts;
   input Size $ @@;
   datalines;
medium    large
large     large
large     medium
medium    small
small     medium
medium    large
small     medium
large     large
large     small
medium    medium
medium    medium
medium    large
small     small
;
 Note about code
proc chart data=shirts;
   vbar size;
   title 'Number of Each Shirt Size Sold';
run;


Output
The frequency chart shows the store's sales of the shirt for the week: 9 large shirts, 11 medium shirts, and 6 small shirts. [HTML Output]
 [Listing Output]


Chapter Contents

Previous

Next

Top of Page

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