Chapter Contents

Previous

Next
The CHART Procedure

Example 4: Producing Side-by-Side Bar Charts


Procedure features:
VBAR statement options:
GROUP=
REF=
SUMVAR=
TYPE=
Data set: PIESALES

This example


Program

options nodate pageno=1 linesize=80 pagesize=60;
 Note about code
proc chart data=piesales;
   vbar flavor / group=bakery


 Note about code
                 ref=100 200 300
 Note about code
                 sumvar=pies_sold

 Note about code
                 type=mean;
   title  'Mean Yearly Pie Sales Grouped by Flavor';
   title2 'within Bakery Location';
run;


Output
The side-by-side bar charts compare the sales of apple pies, for example, across bakeries. The mean for the Clyde Drive bakery is 364, the mean for the Oak Street bakery is 345, and the mean for the Samford Avenue bakery is 261. [HTML Output]
 [Listing Output]


Chapter Contents

Previous

Next

Top of Page

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