BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
DanH_sas
SAS Super FREQ

1. Use the FILLATTRS and ALTFILLATTRS options to reverse the color assignments in that case.

2. Use FILLTYPE=MULTICOLOR to switch to multicolor mode, and use the DATACOLORS option on the STYLEATTRS statement to control the colors.

 

Hope the helps!

Dan

Junyong
Pyrite | Level 9

As in the MWE, I am plotting these series with the BY statement. I need to reverse not all but only the problematic results.

SGPlot1.pngSGPlot3.pngSGPlot5.png

It seems I need MULTICOLOR anyway to respectively assign specific colors to specific values.

DanH_sas
SAS Super FREQ

If you want to assign specific colors to specific BLOCK values, use an ATTRIBUTES MAP with the FILLTYPE=MULTICOLOR setting. That way, the correct colors will be used regardless of data order.

Reeza
Super User
If you do the bands manually, which is what annotation is, then you need to manually ensure they fit within the graphic plotting area. There are valid use cases for having annotations outside of the main graph area so that isn't a limitation within the annotation - there may or may not be an option that supports it. But to have a dynamic solution you either can ensure your data is within the bounds (macro?) or you need to use a different approach, like blockplot, as previously suggested.

SAS Innovate 2025: Call for Content

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!

Submit your idea!

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
  • 18 replies
  • 2469 views
  • 15 likes
  • 6 in conversation