3 weeks ago
SAS base 9.4
I want to make a grouped bar chart using sgplot vbarparm that looks like the one attached (see attachment) but with error bars. Does anyone have code for this? My main goal is to get multiple variables on the x axis and display their different levels without having to have a legend. Thank you!
This is the code I have created for a different bar chart, feel free to make modifications to it in order to create the desired bar chart.
proc sgplot data=state noborder ;
format percent f8.1
where state>0 and percent>0;
STYLEATTRS DATACOLORS=(cxcccccc cx99CCFF cx99CCFF cx99CCFF cx99CCFF cx99CCFF cx99CCFF);
vbarparm category=state response=percent / group=state groupdisplay=cluster
xaxis display=(nolabel noticks noline )
yaxis label='Percent' grid values=(0 to 50 by 10) display=(noticks noline)