3 weeks ago
I use the SG PANEL procedure including a "BY" statement in the code below to produce the following graphs:
proc sgpanel data=_011;
panelby order/columns=5 novarname;
scatter x=o_discharge_fiscal_year y=los_sans_alc_mean / LEGENDLABEL= "All cases"
MARKERATTRS=(symbol=circlefilled color=red size=10)
rowaxis values=(5 to 50 by 10) valueattrs=(size=7) grid;
colaxis grid valueattrs=(size=7);
title h=12pt justify=left italic 'Figure 7: Average LOS by hospital by ISS';
footnote ' ';
format order hosp_order. los_sans_alc_mean 4.1;
As you can see, because the the y-axis values that creates those two figures are very different from each other (the first figure values range between 6.3 and 14.1 and the second figure between 1.0 and 45.6) and I use only one "ROWAXIS" statement in the code, the values in the first graph has the illusion of "stability" (i.e. supressed by the values I choose in the ROWAXIS statement).
I was wondering if there is any way to assign different values to each y-axis based on the variable in the "BY" statement? In this case for instance something like, for Figure 1 (GCS:13-15) rowaxis values=(5 to 15 by 5) and for Figure 2 (GCS:3-8) rowaxis values=(5 to 50 by 10). Perhaps the easiest way to write two seperate SG PANEL codes?
Thanks in advance!
Need further help from the community? Please ask a new question.