I have a data have 4 REGION A,B,C,D AND 22 different measures. A have 6 measure, B have 8 measure ; c have 5 measure , d have 3 measures Gender REGION measure avedose F A 1 50 F A 2 53 F A 3 55 F A 4 52 F A 5 51 F A 6 53 F b 7 54 F b 8 49 F b 9 44 F b 10 32 F b 11 70 ………. F d 22 70 ……. M A 1 50 ….. M d 22 80 I want compare mean of dose in different gender for each measure also can display the measures by REGION. How to do sub plot with shared x -axis and legend and each plot use their own title? title 'average dose by Measure and gender Groups'; title 'A'; proc sgplot data=data(where=(REGION='A')) noborder nowall; hbar measure / response=dose stat=mean group=gender groupdisplay=cluster dataskin=pressed filltype=gradient baselineattrs=(thickness=0); xaxis display=(noline noticks nolabel) grid; yaxis display=(nolabel); run; title ‘B’; proc sgplot data=data(where=( REGION='B')) noborder nowall; hbar measure / response=dose stat=mean group=gender groupdisplay=cluster dataskin=pressed filltype=gradient baselineattrs=(thickness=0); xaxis display=(noline noticks nolabel) grid; yaxis display=(nolabel); run; run; title 'C; proc sgplot data=data(where=( REGION='C')) noborder nowall; hbar measure / response=dose stat=mean group=gender groupdisplay=cluster dataskin=pressed filltype=gradient baselineattrs=(thickness=0); xaxis display=(noline noticks nolabel) grid; yaxis display=(nolabel); run; title 'C; proc sgplot data=data(where=( REGION='D')) noborder nowall; hbar measure / response=dose stat=mean group=gender groupdisplay=cluster dataskin=pressed filltype=gradient baselineattrs=(thickness=0); xaxis display=(noline noticks nolabel) grid; yaxis display=(nolabel); run; or sgplot: ods graphics / reset=all outputfmt=png height=3in width=7in; title 'average dose by Measure and gender Groups'; title 'A'; proc sgpanel data=DATA; panelby MEASURE/ layout=columnlattice onepanel colheaderpos=bottom rows=1 novarname noborder; vbar GENDER/ group=GENDER response=DOSE stat=MEAN group=GENDER nostatlabel; colaxis display=none; rowaxis grid; where REGION='A'; run; title ‘B’; proc sgpanel data=DATA; panelby MEASURE/ layout=columnlattice onepanel colheaderpos=bottom rows=1 novarname noborder; vbar GENDER/ group=GENDER response=DOSE stat=MEAN group=GENDER nostatlabel; colaxis display=none; rowaxis grid; where REGION='B; run; title 'C; proc sgpanel data=DATA; panelby MEASURE/ layout=columnlattice onepanel colheaderpos=bottom rows=1 novarname noborder; vbar GENDER/ group=GENDER response=DOSE stat=MEAN group=GENDER nostatlabel; colaxis display=none; rowaxis grid; where REGION=C'; run; title 'D; proc sgpanel data=DATA; panelby MEASURE/ layout=columnlattice onepanel colheaderpos=bottom rows=1 novarname noborder; vbar GENDER/ group=GENDER response=DOSE stat=MEAN group=GENDER nostatlabel; colaxis display=none; rowaxis grid; where REGION='D'; run; ods _all_ close; ods preferences; or https://support.sas.com/resources/papers/proceedings/pdfs/sgf2008/255-2008.pdf this article had code below how can I wisely use this code to my case? title1 "Product Sales"; proc sgpanel data=sashelp.prdsale; by year; panelby quarter; rowaxis label="Sales"; vbar product / response=predict transparency=0.3; vbar product / response=actual barwidth=0.5 transparency=0.3; run; Thank you so much for your helping!
... View more