Hello,
I'm attempting to create a graph to demonstrate variation in medication use by hospitals and region. I think I've gotten close to what I'm after, but I'm running into some struggles while trying to fine tune the figure.
proc sgpanel data=hospitalgraph;
panelby region / novarname onepanel noborder layout=columnlattice uniscale=column ;
vbar ID / response=all_opioid_Mean stat=mean categoryorder=RESPASC barwidth= 0.6 groupdisplay=cluster ;
vbar ID / response=methadone_mean stat=mean barwidth= 0.4 groupdisplay=cluster ;
rowaxis label="Proportion" discreteorder=data ;
colaxis valueattrs=(size=7) VALUESROTATE=VERTICAL label ='Hospital Number';
format region REGION_.;
run;
Specifically, what are some tips/tricks for:
Thank you,
SO
In addition to adding the PROPORTIONAL option mentioned by @Ksharp , add FITPOLICY=ROTATEALWAYS to the COLAXIS. This forces the axis tick values to rotate, even if there is no collision.
When you used the PROPORTIONAL option, the spacing for the second cell must have compressed in a way that there were collisions on that axis as well, causing the ROTATE fit policy to be applied there as well.
Available on demand!
Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.
Select SAS Training centers are offering in-person courses. View upcoming courses for: