BookmarkSubscribeRSS Feed
PTD_SAS
Obsidian | Level 7

I use Gplot to overlay 18-20 graphs in the same screen and would like different colors for each of them.

For the symbol statement I use repeat=20 without specifying colors,so the charts are created but the colors are repeated after the 12th graph, seems like the automatically selected colors are only 12, the 13th one is the same as the 1st.

 

What can I do to force SAS to automatically select different colors for each of the 20 graphs?

2 REPLIES 2
Ksharp
Super User

It is SAS/Graph question. Post is at SAS/GRAPH and ODS Graphics 

Robert.Allison is good at it . Here is his website.

http://robslink.com 

ballardw
Super User

Old school solution:

 

Define 20 symbol statements SYMBOL1 to SYMBOL20, each with the color you want.

The plot statement would be

plot y*x1=1 y*x2=2 y*x3=3 ... y*x20=20 / <options>;

 

 

The recycle at 12 is I believe a sideffect of ODS Styles as they predefine 12 data colors.

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 Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

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
  • 2 replies
  • 879 views
  • 2 likes
  • 3 in conversation