Hello all,
I use the SG PANEL procedure including a "BY" statement in the code below to produce the following graphs:
proc sgpanel data=_011;
by gcs_group;
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)
TRANSPARENCY=0.3
DATALABEL=los_sans_alc_mean
DATALABELATTRS=(color=black size=4)
DATALABELPOS=top;
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;
run;
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!
Recep
Perhaps you want Uniscale=column on the Panelby without a rowaxis values list. Each row would have it's own y scale.
Perhaps you want Uniscale=column on the Panelby without a rowaxis values list. Each row would have it's own y scale.
Thanks a lot for a prompt response!
Recep
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
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.