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-2026-white.png



April 27 – 30 | Gaylord Texan | Grapevine, Texas

Registration is open

Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!

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
  • 937 views
  • 0 likes
  • 2 in conversation