Hi,
Is there somewhere on the SAS website where it states the order that colors are used in SAS graph, when no color is used within the graph.
I just need to know the order SAS graph (I am using PROC SGPLOT) cycles through the colors available.
Thanks,
Mani
Most ODS styles will have objects GRAPHDATA1 though GRAPHDATAn, n might vary from style to style but 12 seems to be the default for most of the SAS supplied styles. These contain colors for fill, outline, lines, marker types and such. So the first "color" needed by your graph will get values from GRAPHDATA1, the second from GRAPHDATA2, and so on. When the colors get exhausted if more are needed then other rules may come into play such as cycling patterns and line types.
Some of the styles, such as JOURNAL and it's derivatives are intended for mostly black and white or gray scale output so rely more on patterns than color.
Proc template, as shown in the link @PeterClemmensen provided as an example, can get the definitions from a style though may rely on inheritance from a parent style.
Hi and welcome to the SAS Communities 🙂
I think you will find this post very informative
https://blogs.sas.com/content/iml/2017/02/06/group-colors-sgplot.html
Excellent - exactly what I need.
Most ODS styles will have objects GRAPHDATA1 though GRAPHDATAn, n might vary from style to style but 12 seems to be the default for most of the SAS supplied styles. These contain colors for fill, outline, lines, marker types and such. So the first "color" needed by your graph will get values from GRAPHDATA1, the second from GRAPHDATA2, and so on. When the colors get exhausted if more are needed then other rules may come into play such as cycling patterns and line types.
Some of the styles, such as JOURNAL and it's derivatives are intended for mostly black and white or gray scale output so rely more on patterns than color.
Proc template, as shown in the link @PeterClemmensen provided as an example, can get the definitions from a style though may rely on inheritance from a parent style.
Thank you for the information, both responses have exactly what I need.
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!
SAS' Charu Shankar shares her PROC SQL expertise by showing you how to master the WHERE clause using real winter weather data.
Find more tutorials on the SAS Users YouTube channel.