Reputation: 3
i trie to make a bar chart with groups and subgroups. so far i got a stucked barchart like this enter image description here
the code as follows:
proc sgpanel data=transp_4;
panelby time / layout=columnlattice onepanel
colheaderpos=bottom rows=2 novarname noborder;
vbar type / group=grupp_text response=col1 stat=sum group=time
nostatlabel;
colaxis display=(nolabel);
rowaxis grid;
run;
but i want the bars to be next to each other and not stucked. any ideas? thanks, sandra
Upvotes: 0
Views: 399
Reputation: 12909
Use the groupdisplay=cluster
option to change it from stacked to grouped.
proc sgpanel data=transp_4;
panelby time / layout=columnlattice onepanel
colheaderpos=bottom rows=2 novarname noborder;
vbar type / group=grupp_text response=col1 stat=sum group=time
nostatlabel
groupdisplay=cluster;
colaxis display=(nolabel);
rowaxis grid;
run;
Upvotes: 2