You should have a look at ODS Graphics. @Jay54 maintains a blog with lots of great examples.
To get you started find below some sample code. I have not tested it with SAS 9.3, you have a go.
data have;
infile cards dlm=",";
input
Class
Overall pct_overall : percent10.
V_222 PCT_222 : percent10.
V_233 PCT_233 : percent10.
V_244 PCT_244: percent10.
;
format pct_: percent10.2;
cards;
4,3,1%,0,0%,0,0%,3,2%
5,22,15%,60,45%,31,15%,40,30%
7,50,35%,58,38%,44,33%,33,40%
8,130,27%,77,32%,50,40%,20,15%
9,70,18%,18,13%,15,11%,18,9%
10,33,8%,13,8%,17,8%,9,7%
13,9,4%,6,4%,25,20%,7,4%
14,11,2%,2,1%,7,3%,1,1%
16,18,6%,0,0%,9,8%,4,5%
17,12,3%,0,0%,4,2%,5,5%
19,8,2%,0,0%,6,3%,1,1%
20,6,1%,0,0%,3,1%,2,3%
;
proc sgplot data=have;
vbar class / response=pct_overall barwidth=0.2 discreteoffset=-0.3
legendlabel="Overall" fillattrs=(color=cxffff00)
;
vbar class / response=pct_222 barwidth=0.2 discreteoffset=-0.1
legendlabel="V_222 "
;
vbar class / response=pct_233 barwidth=0.2 discreteoffset=0.1
legendlabel="V_233"
;
vbar class / response=pct_244 barwidth=0.2 discreteoffset=0.3
legendlabel="V_244"
;
keylegend / noborder across=1 location=inside position=right;
yaxis label="Account(%)";
run;
proc transpose
data=have
out=have_trsp
;
by Class;
var pct_:;
run;
proc sgplot data=have_trsp;
vbar class /
response=col1 group=_name_ groupdisplay=cluster GROUPORDER=DATA
;
yaxis label="Account(%)";
keylegend /
across=1 noborder location=inside position=right title=""
;
run;
Bruno
... View more