BookmarkSubscribeRSS Feed
Calcite | Level 5


I am running into this issue and it would be great if someone can help me out.

I am using the following statements:

goptions vsize=5 hsize=7 gunit=pct cback=white horigin=0.5

         ftext=swiss ftitle=swissb htitle=3 htext=3;

symbol value=dot interpol=hilobj;

proc gplot data=all;

plot y * instrument = sample;


Since I have about 30 samples, SAS seems to be running out of colors and after 12 samples, it starts with the same set of colors but now with other symbols. And, most importantly, it is not drawing those lines connecting the samples (across the 3 instruments) once it switches to the different symbol-so I have lines joining the first 12 samples only. Is there a way to make SAS draw the lines for all the samples (i.e. make SAS use only dots and some more colors additional to the first 12)?

Thanks so much for reading!

Meteorite | Level 14

Sounds like you'll want to use the 'repeat=' option on your symbol statement, to repeat the marker value= and line interpol= for all ~30 of your samples.  I typically use a repeat number much higher than I actually need, just to be on the safe side.  Here's a short example to get you started...

symbol value=dot interpol=join repeat=100;

proc gplot;
plot y*x=state;

Calcite | Level 5

Thanks so much! I finally had a chance to try that and it worked very well for me. Thanks for your answer

Calcite | Level 5



I tried this approach (using SAS Studio in a SAS Grid environment, V3.5 (Enterprise Edition)) with proc gplot and I am successful in getting all of my data represented with a symbol value = dot, but even with the r=100 (for example) option I am still only seeing the same 12 colors repeated over my many series.  Has something changed in since this post (e.g., a new option that I should be choosing) that might solve this issue for me?


symbol interpol=join value=dot r=100;


Thanks in advance for any guidance,


Meteorite | Level 14

CRMcClure - I believe what you are seeing is the expected behavior. In recent versions of SAS, default colors are controlled by ods styles (the default style probably being htmlblue), and I believe the styles have about 12 colors in them. I think in most SAS/Graph procs, once the color list is exhausted, the colors are recycled with a slightly different shade (I forget if it's lighter or darker).


But really, once you have more than a few (maybe 5?) colors in a plot ... especially a line plot, I don't think most users will be able to discern them. I would suggest possibly using another strategy to color your lines. I often find that in a plot with a lot of lines, it is often useful to make all the lines a light color, and the the one line-of-interest red. Here's an example:



Calcite | Level 5

Much appreciated, this helped me solve my problem.  Thanks.



Registration is open! SAS is returning to Vegas for an AI and analytics experience like no other! Whether you're an executive, manager, end user or SAS partner, SAS Innovate is designed for everyone on your team. Register for just $495 by 12/31/2023.

If you are interested in speaking, there is still time to submit a session idea. More details are posted on the website. 

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.

Get the $99 certification deal.jpg



Back in the Classroom!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 5 replies
  • 1 like
  • 3 in conversation