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