/* Set graphics options */
goptions reset=all ctext=black cback=white
lfactor=2 ftext=swissb htext=.5;
/* Create data set containing 1993 and 1994 recycling volumes */
data recycle;
length category $15;
input year category $ & tons;
cards;
1993 Organic Waste 395
1993 Paper Products 892
1993 Glass 135
1993 Metals 74
1993 Plastics 51
1994 Organic Waste 422
1994 Paper Products 1058
1994 Glass 180
1994 Metals 86
1994 Plastics 62
;
/* Define patterns */
pattern1 v=solid c=ligrybr;
pattern2 v=solid c=ligb;
pattern3 v=solid c=libr;
pattern4 v=solid c=lig;
pattern5 v=solid c=ligr;
/* Assign legend options */
legend1 across=1 position=(right bottom) frame label=none
value=(h=1);
/* Generate DONUT chart */
proc gchart data=recycle gout=sasuser.picthis;
title h=2 "Recycling Program for Anytown, U.S.A.";
donut category / sumvar=tons
donutpct=40
noheading
subgroup=year
percent=inside
value=inside
ascending
coutline=black
other=0
label=(h=1 "Volume" j=c "in Tons")
legend=legend1
;
run;
quit;