Hello!
I'm trying to create a graph comparing the trends in disease occurrence in two populations, but the populations are different sizes so I need to plot different Y axis scales for the two panels. I've tried using the UNISCALE=COLUMN statement but the scales didn't change. Here is my code:
proc sgpanel data=timedata;
panelby idu / uniscale=column;
styleattrs datacontrastcolors=(blue red green brown) datalinepatterns=(solid);
series x=year y=count1 / group=disease lineattrs=(thickness=2) legendlabel="Disease";
series x=year y=count2 / group=disease lineattrs=(thickness=2) legendlabel="Disease";
refline 2015.75 / axis=x label=("ICD-10-CM Transition");
run;I've attached the graph this code generates. To clarify my code, count1 is the count up until the marked line and count2 is the count since the marked line, since I needed to plot two separate values on the vertical line.
Also setting COLUMNS=1 on the PANELBY statement should give you the ranges you want.
Hope this helps!
Dan
Also setting COLUMNS=1 on the PANELBY statement should give you the ranges you want.
Hope this helps!
Dan
April 27 – 30 | Gaylord Texan | Grapevine, Texas
Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and save with the early bird rate—just $795!
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.
Ready to level-up your skills? Choose your own adventure.