BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
SeaMoon_168
Quartz | Level 8

I want to change the font and size of the at-risk table using Proc Lifetest (shown below). I can find article about how to adjust the font and size for labels and titles. I want to change the table font to Times New Roman and font to 12. Many thanks.

Find the figure onlineFind the figure online

1 ACCEPTED SOLUTION

Accepted Solutions
FreelanceReinh
Jade | Level 19

Hello @SeaMoon_168,

 

Are you already using the macros provided by SAS that facilitate the customization of the Kaplan-Meier plot? If not, just copy and submit the code from https://support.sas.com/documentation/onlinedoc/stat/ex_code/151/templft.html .

 

Then changing the font family and size is as easy as setting a macro variable (here: AtRiskOpts) between two macro calls:

 

%ProvideSurvivalMacros

%let AtRiskOpts = labelattrs=(family='Times New Roman' size=12pt)
                  valueattrs=(family='Times New Roman' size=12pt);

%CompileSurvivalTemplates

proc lifetest data=sashelp.BMT
              plots=survival(atrisk(outside maxlen=13));
   time T * Status(0);
   strata Group;
run;

See Controlling the Survival Plot by Modifying Graph Templates for the documentation.

View solution in original post

2 REPLIES 2
FreelanceReinh
Jade | Level 19

Hello @SeaMoon_168,

 

Are you already using the macros provided by SAS that facilitate the customization of the Kaplan-Meier plot? If not, just copy and submit the code from https://support.sas.com/documentation/onlinedoc/stat/ex_code/151/templft.html .

 

Then changing the font family and size is as easy as setting a macro variable (here: AtRiskOpts) between two macro calls:

 

%ProvideSurvivalMacros

%let AtRiskOpts = labelattrs=(family='Times New Roman' size=12pt)
                  valueattrs=(family='Times New Roman' size=12pt);

%CompileSurvivalTemplates

proc lifetest data=sashelp.BMT
              plots=survival(atrisk(outside maxlen=13));
   time T * Status(0);
   strata Group;
run;

See Controlling the Survival Plot by Modifying Graph Templates for the documentation.

SeaMoon_168
Quartz | Level 8

Awesome! It works very well. Many thanks for your help.

hackathon24-white-horiz.png

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

What is ANOVA?

ANOVA, or Analysis Of Variance, is used to compare the averages or means of two or more populations to better understand how they differ. Watch this tutorial for more.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 2 replies
  • 1950 views
  • 0 likes
  • 2 in conversation