BookmarkSubscribeRSS Feed
jenim514
Pyrite | Level 9

Hi,  i need to create this graphic but I can't figure out how to keep the lines continuous with the break in the y-axis

Here is my mock:

jenim514_0-1618538175219.png

 

But here is a snip of what I am getting with my code. Any help is greatly appreciated!!

 

jenim514_1-1618538238864.png

 

Here is my code.  


proc sgplot data=all&pcode  NOAUTOLEGEND ;
   series x=avisitn y=aval / group=usubjid /*grouplc=trt01p*/  name='grouping' markers markerattrs=(size=10pt symbol=trianglefilled);
   keylegend 'grouping' / type=linecolor;
     
  
   xaxis label="Days after HCT" values=(0 28 56 90) valuesdisplay= ('0' '28' '56' '90');                                                                                       
   yaxis label="&yax" ranges=(0-10 80-max) values=(0 to 100 by 10);

   styleattrs datalinepatterns=(solid solid) ;
run;

 

3 REPLIES 3
ChrisNZ
Tourmaline | Level 20

Having a "continuous" line is misleading.

The X value for Y=70 is not 5 as the first graph  implies, but 25 as correctly reported by the second graph. 

jenim514
Pyrite | Level 9
Is there a way to narrow the interval space between 0 and 28 on the x-axis, keeping all values currently displayed?
ChrisNZ
Tourmaline | Level 20

What would be the benefit of removing 20-odd days on an axis that displays 200 days?

hackathon24-white-horiz.png

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 3 replies
  • 1513 views
  • 0 likes
  • 2 in conversation