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-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

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