Chapter Contents

Previous

Next
The CHART Procedure

Example 2: Producing a Percentage Bar Chart


Procedure features:
VBAR statement option:
TYPE=
Data set: SHIRTS


This example produces a vertical bar chart. The chart statistic is the percentage for each category of the total number of shirts sold.


Program

options nodate pageno=1 linesize=80 pagesize=60;
 Note about code
proc chart data=shirts;
   vbar size / type=percent;
   title 'Percentage of Total Sales for Each Shirt Size';
run;


Output
The chart shows the percentage of total sales for each shirt size. Of all the shirts sold, about 42.3 percent were medium, 34.6 were large, and 23.1 were small. [HTML Output]
 [Listing Output]


Chapter Contents

Previous

Next

Top of Page

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