Hello all, I am working on a customized version a failure plot using GTL. It's my first stab at it, and I've been able to glean a decent amount of information from Sanjay's work and the Producing High-Quality Figures Using SAS/GRAPH® and ODS Graphics Procedures book to get to the point where I'm almost satisfied with what I need. My last remaining problem is being able to customize the x and y axis to be bolder or have a greater thickness. I believe I need to use the GraphGridLines option but I'm not sure where it would go in the code I've included below. (Note: a dummy dataset is included for anyone super curious) The examples I've seen more or less focus on modifying pre-existing table styles and using this option. Since this table is 'built from scratch' I'm not sure where to invoke this option. Is this the correct option for a bolder axis? If so, how can I use it? Does it go in a style statement? Or is there a better option? Thanks! Erica %let outloc = ..\figures;
proc format;
value drugdf
1 = 'Drug A'
2 = 'Drug B';
run;
data BCANCER;
input Subjid Drug Year Status @@;
format Drug drugdf.;
label Year = "Survival Time (Yr)"
status = "Status: 1 = death, 0 = cencored";
datalines;
1 1 10 0 2 1 9 1 3 1 5 1 4 1 9 1 5 1 10 1
6 1 3 1 7 1 10 0 8 1 7 1 9 1 10 0 10 1 10 0
11 1 10 0 12 1 3 0 13 1 6 1 14 1 10 0 15 1 10 0
16 1 1 1 17 1 10 0 18 1 10 0 19 1 10 0 20 1 5 0
21 1 10 0 22 1 10 0 23 1 10 0 24 1 10 0 25 1 4 1
26 1 10 0 27 1 10 1 28 1 10 0 29 1 10 0 30 1 10 0
31 1 2 1 32 1 10 0 33 1 10 0 34 1 10 0 35 1 8 1
36 1 10 0 37 1 10 0 38 1 9 0 39 1 10 0 40 1 10 0
41 1 10 0 42 1 2 1 43 1 10 0 44 1 10 1 45 1 10 0
46 1 10 0 47 1 5 1 48 1 10 0 49 1 10 0 50 1 9 1
51 2 4 1 52 2 10 1 53 2 2 1 54 2 5 1 55 2 10 0
56 2 1 1 57 2 10 0 58 2 9 1 59 2 3 1 60 2 10 0
61 2 3 0 62 2 6 1 63 2 10 0 64 2 3 1 65 2 10 0
66 2 4 1 67 2 10 0 68 2 2 1 69 2 10 0 70 2 5 1
71 2 10 1 72 2 8 0 73 2 10 0 74 2 2 1 75 2 10 0
76 2 6 1 77 2 10 0 78 2 3 0 79 2 10 1 80 2 8 1
81 2 10 0 82 2 3 1 83 2 10 0 84 2 7 1 85 2 10 1
86 2 10 0 87 2 3 1 88 2 10 0 89 2 10 0 90 2 2 1
91 2 10 0 92 2 4 1 93 2 10 0 94 2 10 1 95 2 8 1
96 2 10 0 97 2 1 1 98 2 10 0 99 2 10 0 100 2 3 1
;
run;
ods graphics on;
ods listing gpath = "&outloc.";
ods output Failureplot = failureplot;ods select failureplot(persist);
ods graphics/reset = all width = 8in height = 6in noborder OUTPUTFMT = EMF imagename = "Failure Plot 1";
proc lifetest data = BCANCER plots = survival(failure test atrisk = 0 to 10 by 1);
time Year * Status(0);
strata Drug;
run;
proc sort data = failureplot out = failureplot2 nodup;
by Time Survival AtRisk Event Censored tAtRisk Stratum StratumNum _1_SURVIVAL_ _1_CENSORED_;
run;
ods select all;
proc template;
define statgraph SurvivalPlotAtRisk_Outside_Scatter;
begingraph;
entrytitle 'Product-Limit Survival Estimates';
entrytitle 'With Number of AML Subjects at Risk' / textattrs=(size=10);
layout lattice / columns=1 rowweights=(0.90 0.10) rowgutter=10;
layout overlay / yaxisopts=(linearopts=(viewmin=0));
stepplot x=time y=survival / group=stratum curvelabel=stratum lineattrs=(pattern=solid thickness =2) name='s';
endlayout;
layout overlay / xaxisopts=(display=none) walldisplay=none
yaxisopts=(display=(tickvalues) tickvalueattrs=(size=10)) ;
scatterplot x=tatrisk y=stratum / group=stratum markercharacter=atrisk
markercharacterattrs=(size=10);
endlayout;
endlayout;
endgraph;
end;
run;
/*--Survival Plot with outer Risk Table using Scatter Plot--*/
ods graphics/reset = all width = 8in height = 6in noborder OUTPUTFMT = EMF imagename = "FP_AR";
proc sgrender data=failureplot2 template=SurvivalPlotAtRisk_Outside_Scatter;
format stratumNum drugdf.;
run;
... View more