BookmarkSubscribeRSS Feed
JB_DataAnalyst
Obsidian | Level 7

Hello,

 

I have two groups in my table. How could I customized the color that lets say group 1 is red and group 2 is blue or

 

my startcolor is red and endcolor is blue

 

Please help

 

Thanks!! 🙂

1 REPLY 1
Cynthia_sas
SAS Super FREQ
Hi:
It depends partly on how you are creating your bar charts: SAS/GRAPH or ODS GRAPHICS. And, what kind of template? A style template or a graph template? Generally, grouped data is given colors by the GDATA1-GDATA12 style elements in a style template. If you change the colors in the style template, then the style template colors will be used unless you have other overriding statements. I have an example of changing bar chart colors in the paper:
https://support.sas.com/resources/papers/proceedings10/033-2010.pdf

But there are other ways to change the color, too. If you always want one group to be red and the other group to be blue and, if you are using ODS GRAPHICS, then an attribute map is another way to change colors based on a group value. It really depends on how you are creating the graphs.

cynthia

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
  • 3017 views
  • 0 likes
  • 2 in conversation