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: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 18 replies
  • 2594 views
  • 15 likes
  • 6 in conversation