BookmarkSubscribeRSS Feed
Lapis Lazuli | Level 10
ods graphics on;
proc lifetest data=matched3 method=km atrisk
plots=(S(test nocensor atrisk=0 to 3000 by 500)) 
method=km MAXTIME= 3000 intervals=(1 to 3000 by 500);
time period2*outcome2(0);
strata drug/ adjust=sidak test=logrank;run;
ods graphics off;

Would it be possible to adjust the y-axis to start at zero as the above code create a graph with a gap before zero. 


Jade | Level 19

Hello @lillymaginta,


I assume you mean the "gap" due to the patients-at-risk table inside the plot. You can use the OUTSIDE suboption to display that table outside the plot, which should resolve the issue with the y-axis except for a small offset (see documentation and for an example Displaying the Patients-at-Risk Table outside the Plot):

plots=(S(test nocensor atrisk(outside(0.15))=0 to 3000 by 500)) 

You may need to adjust the percentage (0.15=15% of the vertical space) to your requirements or try the default, i.e., omit the "(0.15)".


Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.


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.

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
  • 1 reply
  • 2 in conversation