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?

SAS Innovate 2025: Call for Content

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!

Submit your idea!

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

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

View all other training opportunities.

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