BookmarkSubscribeRSS Feed
at16
Fluorite | Level 6

Hello,

 

I am trying to change the title size for a K-M graph, and cannot seem to get it right. I am using

%SurvivalTemplateRestore
to change the title and axis and created a style template to change the line colors/style.

 

adding %let tatters = textattrs=(size=20pt weight=bold) did not work.

 

Is there an easy way to increase the font size? Thanks!

 

-Angela

 

data _null_;
infile 'http://support.sas.com/documentation/onlinedoc/stat/ex_code/121/templft2.html'
device=url;
file 'junk.junk';
retain pre 0;
input;
if index(_infile_, '</pre>') then pre = 0;
if pre then put _infile_;
if index(_infile_, '<pre>') then pre = 1;
run;
%inc 'junk.junk' / nosource;

%SurvivalTemplateRestore

%let TitleText0 = "Survival"; /* Change the title. */
%let gridopts = autoalign=(TOPRIGHT BOTTOMLEFT TOP BOTTOM)
                border=true BackgroundColor=GraphWalls:Color Opaque=true;
layout gridded / rows=2 &gridopts;
%let tips = rolename=(_tip1= ATRISK _tip2=EVENT)
tiplabel=(_tip1="Number at Risk" _tip2="Observed Events")
tip=(x y _tip1 _tip2) lineattrs=(thickness=2.5);
%let TitleText1 = &titletext0 " for " STRATUMID;
%let TitleText2 = &titletext0;
%let yOptions   = label="Survival Probability"
                  shortlabel="Survival"
                  labelattrs=(size=16pt weight=bold)
                  tickvalueattrs=(size=16pt)
                  linearopts=(viewmin=0 viewmax=1
                              tickvaluelist=(0 .2 .4 .6 .8 1.0));

%let xOptions = 
 labelattrs=(size=16pt weight=bold)
                  tickvalueattrs=(size=16pt)
linearopts=(viewmin=0 viewmax=108
tickvaluelist=(0 12 24 36 48 60 72 84 96 108));

%SurvivalTemplate 	/* Compile the templates with */
					/* the new title. */

proc template;
  define style styles.mystyle;

    style GraphData1 from GraphData1 /
          contrastcolor=blue linestyle=1;
    style GraphData2 from GraphData2 /
          contrastcolor=dark orange linestyle=1;
   style GraphData3 from GraphData3 /
          contrastcolor=blue linestyle=4;
  style GraphData4 from GraphData4 /
          contrastcolor=dark orange linestyle=4;
    style GraphData5 from GraphData5 /
          contrastcolor=blue linestyle=2;
   style GraphData6 from GraphData6 /
          contrastcolor=dark orange linestyle=2;
  end;
run;

ods html style=mystyle ;
proc lifetest data=test outsurv=surv plots=survival (nocensor) maxtime=108;
	time surv*censor(1);
	strata  group/order=internal;
	label  group='';
	label  surv='Survival';

	format  group grpf.;

run;
ods html close;

%SurvivalTemplateRestore
proc template; /* Restore the default templates. */
delete Stat.Lifetest.Graphics.ProductLimitSurvival / store=sasuser.templat;
delete Stat.Lifetest.Graphics.ProductLimitSurvival2 / store=sasuser.templat;
run;

 

1 REPLY 1
tamhane
Obsidian | Level 7

Try using PROC SGPLOT on the output data.

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

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.

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