/**********************************************************************/


data sales;
   input city $char9. year quarter sales;
   cards;
Midville  1991 1 20000
Midville  1991 2 20000
Midville  1991 3 18000
Midville  1991 4 14000
Midville  1992 1 25000
Midville  1992 2 22000
Midville  1992 3 21000
Midville  1992 4 12000
Farmville 1991 1 15000
Farmville 1991 2 16000
Farmville 1991 3 20000
Farmville 1991 4 15000
Farmville 1992 1 18000
Farmville 1992 2 19000
Farmville 1992 3 21000
Farmville 1992 4 15000
;


/**********************************************************************/


proc format;
   value quarterf 1='Winter'
                  2='Spring'
                  3='Summer'
                  4='Fall';
run;

pattern1 c=black v=s;
pattern2 c=gray66 v=s;
pattern3 c=grayaa v=s;
pattern4 c=graycc v=s;


/**********************************************************************/


goptions ftext=swiss;
proc gchart;
   where year=1991;
   vbar city / subgroup=quarter sumvar=sales raxis=axis1
               maxis=axis2 legend=legend1;
   axis1 origin=(15 pct, 20 pct) label=none;
   axis2 origin=(15 pct, 20 pct) length=30 pct label=none;
   legend1 cshadow=black frame label=none value=(j=l)
           shape=bar(5,2);
   title h=8 pct 'Yearly Sales by Quarter';
   title2 h=5 pct m=(25 pct,+0 pct) '1991';
   format quarter quarterf.;
run;


/**********************************************************************/


   where year=1992;
   vbar city / subgroup=quarter sumvar=sales raxis=axis1
               maxis=axis2 nolegend;
   axis1 origin=(60 pct, 20 pct) label=none;
   axis2 origin=(60 pct, 20 pct) length=30 pct label=none;
   title h= 8 pct ' ';
   title2 h=5 pct m=(70 pct, +0 pct) '1992';
run;


/**********************************************************************/


proc greplay igout=gseg nofs;
   tc sashelp.templt;
   template whole;
   treplay 1:1 1:2;
quit;


/**********************************************************************/