BookmarkSubscribeRSS Feed
Jubilantlula
Calcite | Level 5

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!

1 REPLY 1
ballardw
Super User

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.

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!

What is ANOVA?

ANOVA, or Analysis Of Variance, is used to compare the averages or means of two or more populations to better understand how they differ. Watch this tutorial for more.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 1 reply
  • 1608 views
  • 0 likes
  • 2 in conversation