Procedure features: |
VBAR statement options:
|
GROUP= |
|
REF= |
|
SUMVAR= |
|
TYPE= | |
|
Data set: |
PIESALES
|
This example
-
charts the mean values of
a variable for the categories of another
variable
-
creates side-by-side bar charts for the categories of a third
variable
-
draws reference lines across the charts.
|
options nodate pageno=1 linesize=80 pagesize=60; |
|
proc chart data=piesales;
vbar flavor / group=bakery |
|
ref=100 200 300 |
|
sumvar=pies_sold |
|
type=mean; |
|
title 'Mean Yearly Pie Sales Grouped by Flavor';
title2 'within Bakery Location';
run; |
|
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
| |
|
|
Copyright © 2010 by SAS Institute Inc., Cary, NC, USA. All rights reserved.