Previous Page | Next Page

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

 Note about code
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;
 Note about code
   title  'Mean Yearly Pie Sales Grouped by Flavor';
   title2 'within Bakery Location';
run;

Output: Listing

 Note about figure
                    Mean Yearly Pie Sales Grouped by Flavor                    1
                             within Bakery Location

 Pies_Sold Mean

     |  ***
 350 +  ***                   ***
     |  ***                   ***
     |  ***                   ***
     |  ***                   ***
     |  ***                   ***
 300 +--***-------------------***----------------------------------------------
     |  ***       ***         ***
     |  ***       ***         ***       ***
     |  ***       ***         ***       ***
     |  ***       ***         ***       ***         ***
 250 +  ***       ***         ***       ***         ***
     |  ***       ***         ***       ***         ***
     |  ***       ***         ***       ***         ***
     |  ***       ***         ***       ***         ***
     |  ***       ***         ***       ***         ***
 200 +--***-------***---------***-------***---------***------------------------
     |  ***  ***  ***         ***  ***  ***         ***
     |  ***  ***  ***         ***  ***  ***         ***       ***
     |  ***  ***  ***         ***  ***  ***         ***       ***
     |  ***  ***  ***         ***  ***  ***         ***       ***
 150 +  ***  ***  ***         ***  ***  ***         ***       ***
     |  ***  ***  ***         ***  ***  ***         ***       ***
     |  ***  ***  ***         ***  ***  ***         ***       ***
     |  ***  ***  ***         ***  ***  ***         ***  ***  ***
     |  ***  ***  ***         ***  ***  ***         ***  ***  ***
 100 +--***--***--***---------***--***--***---------***--***--***--------------
     |  ***  ***  ***         ***  ***  ***         ***  ***  ***
     |  ***  ***  ***         ***  ***  ***         ***  ***  ***
     |  ***  ***  ***         ***  ***  ***         ***  ***  ***
     |  ***  ***  ***  ***    ***  ***  ***         ***  ***  ***
  50 +  ***  ***  ***  ***    ***  ***  ***  ***    ***  ***  ***
     |  ***  ***  ***  ***    ***  ***  ***  ***    ***  ***  ***
     |  ***  ***  ***  ***    ***  ***  ***  ***    ***  ***  ***  ***
     |  ***  ***  ***  ***    ***  ***  ***  ***    ***  ***  ***  ***
     |  ***  ***  ***  ***    ***  ***  ***  ***    ***  ***  ***  ***
     --------------------------------------------------------------------------
         a    b    c    r      a    b    c    r      a    b    c    r    Flavor
         p    l    h    h      p    l    h    h      p    l    h    h
         p    u    e    u      p    u    e    u      p    u    e    u
         l    e    r    b      l    e    r    b      l    e    r    b
         e    b    r    a      e    b    r    a      e    b    r    a
              e    y    r           e    y    r           e    y    r
              r         b           r         b           r         b
              r                     r                     r

        |----- Clyde ----|    |------ Oak -----|    |---- Samford ---|   Bakery

Previous Page | Next Page | Top of Page