BookmarkSubscribeRSS Feed
daveconifer1
Fluorite | Level 6

I found this instruction in Warren Kuhfeld's documentation for controlling the color of the LIFETEST plot line:

 

%let GraphOpts = DataContrastColors=(red green blue)

                              DataColors = (red green blue);

 

However, I find that this only works when a STRATA statement is used.  I'm plotting a single group, and don't want a STRATA (because I don't want a legend or the strata title in the plot).  But the line comes out gray without the STRATA.

 

It's not the end of the world, but is there a way to have a non-gray line without STRATA label in the to

2 REPLIES 2
ChrisNZ
Tourmaline | Level 20

Where do you use this macro variable?

Show the code please.

FreelanceReinh
Jade | Level 19

Hi @daveconifer1,

 

The macro code (see macro SingleStratum) suggests that for your purpose macro variable StepOpts is relevant. Modifying the example Changing the Line Thickness to 

%ProvideSurvivalMacros

%let StepOpts = lineattrs=(color=red);

%CompileSurvivalTemplates

proc lifetest data=sashelp.BMT plots=survival(cb=hw test);
   where Group='ALL';
   time T * Status(0);
   /* STRATA statement removed */
run;

yields a red Kaplan-Meier curve (for group 'ALL').

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
  • 2 replies
  • 543 views
  • 0 likes
  • 3 in conversation