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 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
  • 1 reply
  • 463 views
  • 0 likes
  • 2 in conversation