BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
Giampaolo
Obsidian | Level 7

Hello,

Could you please help with the following issue?

I am plotting series and bands by group on the same graph.

The bands are automatically distinct by color when I use the default opaque.

When I add the transparency option the groups are no longer distinct by color. How can I assign distinct colors to the bands of the groups?

Thank you very much for your help.

 

proc sgplot data=dataset;
title "test";
series x=level y=mean_var / group = diabetes;
band x=level upper=p75_var
lower=p25_var / fillattrs=(transparency=0.5)  group = diabetes ;
run;

1 ACCEPTED SOLUTION

Accepted Solutions
Rick_SAS
SAS Super FREQ

use

band x=level upper=p75_var lower=p25_var / fillattrs=GraphData(transparency=0.5) group=diabetes ;

View solution in original post

3 REPLIES 3
Rick_SAS
SAS Super FREQ

use

band x=level upper=p75_var lower=p25_var / fillattrs=GraphData(transparency=0.5) group=diabetes ;

Rick_SAS
SAS Super FREQ

BTW, the more usual syntax is 

band x=level upper=p75_var lower=p25_var / transparency=0.5 group = diabetes ;

 

You put the TRANSPARENCY option inside the FILLATTRS= option, which is what caused your problem.

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