BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
megsredl
Obsidian | Level 7

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. 

1 ACCEPTED SOLUTION

Accepted Solutions
DanH_sas
SAS Super FREQ

Also setting COLUMNS=1 on the PANELBY statement should give you the ranges you want.

 

Hope this helps!
Dan

View solution in original post

2 REPLIES 2
DanH_sas
SAS Super FREQ

Also setting COLUMNS=1 on the PANELBY statement should give you the ranges you want.

 

Hope this helps!
Dan

megsredl
Obsidian | Level 7
That worked, thank you so much!

SAS INNOVATE 2024

Innovate_SAS_Blue.png

Registration is open! SAS is returning to Vegas for an AI and analytics experience like no other! Whether you're an executive, manager, end user or SAS partner, SAS Innovate is designed for everyone on your team. Register for just $495 by 12/31/2023.

If you are interested in speaking, there is still time to submit a session idea. More details are posted on the website. 

Register now!

How to Concatenate Values

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.

Get the $99 certification deal.jpg

 

 

Back in the Classroom!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 2 replies
  • 3072 views
  • 0 likes
  • 2 in conversation