Programming the statistical procedures from SAS

Change color on survival charts

Reply
New Contributor
Posts: 2

Change color on survival charts

Greetings,

I just created a very simple survival chart (code & cart are attached) and was trying to change the colors from "red" and "blue" into something else, like "purple" and "orange".

Would anyone tell me where I did wrong?

I tried to following the instructions from the following link; however, those colors are still remain the same.

http://support.sas.com/documentation/cdl/en/statug/63962/HTML/default/viewer.htm#statug_templt_a0000...

Thank you for all of the support!

Lindsey

--**********

ods graphics on;

proc template;
   define style Styles.StatColor;
      parent = Styles.HTMLBlue;
      style GraphData1 from GraphData1 / contrastcolor = purple;
      style GraphData2 from GraphData2 / contrastcolor = orange;
   end;
run;

ods listing style=StatColor;

proc lifetest data = sorted_raw_data alpha = 0.05 plots(only) = survival(cl);
      time miles * censored(0);
      by truck;
      strata population;
run;


proc template;
delete Styles.StatColor;
run;

ods graphics off;

--**********

suervival.png

I tried to following the instructions from the following link; however, those colors are still remain the same.

http://support.sas.com/documentation/cdl/en/statug/63962/HTML/default/viewer.htm#statug_templt_a0000...

Thank you for all of the support!

Super User
Posts: 10,843

Re: Change color on survival charts

Your proc template code is changing the contrastcolor which is what the boundary of a barchart would display, not the main color.

Try changing contrastcolor to just color.

Ask a Question
Discussion stats
  • 1 reply
  • 197 views
  • 0 likes
  • 2 in conversation