BookmarkSubscribeRSS Feed
KPCklebspn
Obsidian | Level 7

Hi there,

 

I'd like to change my y axis to have a .1 max value. When I change it to viewmax =0.1 below, I think the y axis does have a max value of 0.1 but it loses the 0.1 label on the y axis (see attached). How do I bring back the 0.1 label?

 

Code here -

 

ods trace on;
proc lifetest data=data3 plots=survival(failure);
time survtimeMo * code(0);
run;

proc template;
source Stat.Lifetest.Graphics.ProductLimitFailure / file='/folders/myfolders/CPE/AMMI2019 reanalysis/tpl';
quit;

data _null_; /* Standard boilerplate */
infile '/folders/myfolders/CPE/AMMI2019 reanalysis/tpl' end=eof; /* Standard boilerplate */
input; /* Standard boilerplate */
if _n_ eq 1 then call execute('proc template;'); /* Standard boilerplate */
_infile_ = tranwrd(_infile_, 'viewmax=1', /* Customization: var = */
'viewmax=0.1'); /* tranwrd(var, from, to);*/
call execute(_infile_); /* Standard boilerplate */
if eof then call execute('quit;'); /* Standard boilerplate */
run; /* Standard boilerplate */

proc template;
source Stat.Lifetest.Graphics.ProductLimitFailure / store=sasuser.templat;
quit;

proc template;
source Stat.Lifetest.Graphics.ProductLimitFailure /
store=sasuser.templat file='/folders/myfolders/CPE/AMMI2019 reanalysis/tpl mod';
quit;

proc lifetest data=data3 plots=survival(failure);
time survtimeMo * code(0);
run;

 

1 REPLY 1
Reeza
Super User
Is there a reason you're not using the standard SAS macros to make these modifications? I believe specifying maxtime in PROC LIFETEST can also do this without getting into templates.

https://support.sas.com/documentation/cdl/en/statug/63033/HTML/default/viewer.htm#statug_lifetest_se...

sas-innovate-white.png

Register Today!

Join us for SAS Innovate 2025, our biggest and most exciting global event of the year, in Orlando, FL, from May 6-9.

 

Early bird rate extended! Save $200 when you sign up by March 31.

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.

SAS Training: Just a Click Away

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

Browse our catalog!

Discussion stats
  • 1 reply
  • 614 views
  • 0 likes
  • 2 in conversation