## X axis tick marks in lifetest.

Occasional Contributor
Posts: 6

# X axis tick marks in lifetest.

I'm capturing the output of proc lifetest through ods.  I need to customize the tick interval on a survival plot for the x axis such that the ticks have values of 0 to 18 by intervals of 1.5.

The lifetest procedure code is:

/*** Compute Kaplan Meier Statistics ***/
ods rtf file = "(directory path)\figures\f4_1.rtf"
style=rtf;

ods graphics on;
proc lifetest data = km1
timelist=0 1.5 3 4.5 6 7.5 9 10.5 12 13.5 15 16.5 18
plots = survival(atrisk=0 1.5 3 4.5 6 7.5 9 10.5 12 13.5 15 16.5 18)
;
time months * event(0);
id usubjid;
strata TRT01PN;
title "Kaplan-Meier plot of PFS based on central review - Figure 4.1";
run;
ods graphics off;
ods listing;
run;

The at-risk table reports at the proper intervals but the ticks on the plot have intervals of 5 instead of 1.5. How do I make the ticks occur at 1.5 intervals?

Posts: 1,137

## Re: X axis tick marks in lifetest.

Try the intervals option in proc lifetest

ods rtf file = "(directory path)\figures\f4_1.rtf"
style=rtf;

ods graphics on;
proc lifetest data = km1 intervals=(0 to 18 by 1.5)
timelist=0 1.5 3 4.5 6 7.5 9 10.5 12 13.5 15 16.5 18
plots = survival(atrisk=0 1.5 3 4.5 6 7.5 9 10.5 12 13.5 15 16.5 18)
;
time months * event(0);
id usubjid;
strata TRT01PN;
title "Kaplan-Meier plot of PFS based on central review - Figure 4.1";
run;
ods graphics off;
ods listing;
run;

Thanks,
Jag
Occasional Contributor
Posts: 6

## Re: X axis tick marks in lifetest.

Thank you for responding. I tried your suggestion but the x axis still shows intervals of 5 instead of 1.5.

Posts: 1,137

## Re: X axis tick marks in lifetest.

it is strange i thought it will work. Could you please comment the timelist and try once.
Thanks,
Jag
Occasional Contributor
Posts: 6