BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
ammarhm
Lapis Lazuli | Level 10

Hi all

I wonder if anyone pease can help me with this code, I am trying to get the Kaplan Meier curves in black/white but not able to do it. Tired style=journal but it didnt work..

Any suggestions please


data _null_;
   %let url = //support.sas.com/documentation/onlinedoc/stat/ex_code/131;
   infile "http:&url/templft.html" device=url;
   file 'macros.tmp';
   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 'macros.tmp' / nosource;
proc template;
     delete Stat.Lifetest.Graphics.ProductLimitSurvival  / store=sasuser.templat;
     delete Stat.Lifetest.Graphics.ProductLimitSurvival2 / store=sasuser.templat;
run;
%ProvideSurvivalMacros

%let StepOpts = lineattrs=(thickness=1.5 );
%let TitleText0 = "Kaplan Meier curve ";    
%let TitleText1 = &titletext0 " FOOOOR " STRATUMID;
%let TitleText2 = &titletext0;
%let yOptions = label="Proportion" linearopts=(viewmin=0 viewmax=1.0);
%let xOptions = label="Years" offsetmin=.0;
%let LegendOpts = title="Histopathology" location=inside autoalign=(Bottom);
%let InsetOpts  = autoalign=(TOPRIGHT BOTTOMRIGHT TOP BOTTOM) border=true BackgroundColor=GraphWalls:Color Opaque=true;

  %CompileSurvivalTemplates

  ods rtf file='c:\Users\Ta\Desktop\PSC KM.doc' style=journal;

ods listing GPATH = 'c:\g' image_dpi = 400;
ods graphics / reset width=7in height=6in imagename='KM';
ods html sge=on;
ods select lifetest.survivalplot;
proc lifetest data=p atrisk plots=survival(/*atrisk (atrisktickonly outside)*/ test /*cb*/ ) notable;
strata pad;
time ltx_fu*death(0);
run;


ods rtf close;


ods select all;
ods listing close;
ods graphics / reset;
ods rtf close;

Any help is appreciated

kind regards

1 ACCEPTED SOLUTION

Accepted Solutions
ammarhm
Lapis Lazuli | Level 10

Solved using:

 

%let GraphOpts = attrpriority=none  DataContrastColors=(black) DataColors=( black);

View solution in original post

1 REPLY 1
ammarhm
Lapis Lazuli | Level 10

Solved using:

 

%let GraphOpts = attrpriority=none  DataContrastColors=(black) DataColors=( black);

sas-innovate-white.png

Register Today!

Join us for SAS Innovate 2025, our biggest and most exciting global event of the year, in Orlando, FL, from May 6-9.

 

Early bird rate extended! Save $200 when you sign up by March 31.

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
  • 2400 views
  • 1 like
  • 1 in conversation