Data visualization with SAS programming

Changing line colors - GTL

Accepted Solution Solved
Reply
Grand Advisor
Posts: 16,315
Accepted Solution

Changing line colors - GTL

I'm using GTL code to make survival plots with a stepplot statement and the group = option to specify the different strata.

I was wondering how to go about and change the plot line colors manually rather than use the default colors. Can I do that in the GTL code directly?


Accepted Solutions
Solution
‎05-15-2012 12:31 PM
SAS Super FREQ
Posts: 864

Re: Changing line colors - GTL

The best choice for you is to use an attributes map. It gives you the ability to assign visual attributes to group values, regardless of data order. Check out these two blog posts for some examples:

http://blogs.sas.com/content/graphicallyspeaking/2012/02/27/roses-are-red-violets-are-blue/

http://blogs.sas.com/content/graphicallyspeaking/2012/03/01/roses-are-red-violets-are-blue-part-2/

Hope this helps!

Dan

View solution in original post


All Replies
SAS Super FREQ
Posts: 864

Re: Changing line colors - GTL

What version of SAS do you have?

Grand Advisor
Posts: 16,315

Re: Changing line colors - GTL

SAS 9.3 TS1M1 I think

Solution
‎05-15-2012 12:31 PM
SAS Super FREQ
Posts: 864

Re: Changing line colors - GTL

The best choice for you is to use an attributes map. It gives you the ability to assign visual attributes to group values, regardless of data order. Check out these two blog posts for some examples:

http://blogs.sas.com/content/graphicallyspeaking/2012/02/27/roses-are-red-violets-are-blue/

http://blogs.sas.com/content/graphicallyspeaking/2012/03/01/roses-are-red-violets-are-blue-part-2/

Hope this helps!

Dan

Grand Advisor
Posts: 16,315

Re: Changing line colors - GTL

Thanks Dan.

I'm also looking at modify the style templates as well, specifically the GraphData1...GraphData attributes.

The data attributes map are probably the better long term solution though.

Post a Question
Discussion Stats
  • 4 replies
  • 199 views
  • 0 likes
  • 2 in conversation