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

Would someone please demonstrate (or point to a sample program) for the use of blockindex with a blockplot graph? My blockplot code is working but I need to associate specific, unchanging colors with my three blockplot values. Usually I can find sample code for most SAS features but I am coming up empty with this one. I know I need the filltype and blockindex options on my blockplot statement but I don't know how to create the color index. I would appreciate any help. Thanks!

 

Cheryl

 

[SAS 9.4 TS Level 1M3 on Win32_7PRO platform]

1 ACCEPTED SOLUTION

Accepted Solutions
Jay54
Meteorite | Level 14

You can use BLOCKINDEX=column option where the column contains the index numbers 1-12 that indicate which of the style group elements are used for each block.  FILLTYPE should be Multicolor.

View solution in original post

3 REPLIES 3
Jay54
Meteorite | Level 14

You can use BLOCKINDEX=column option where the column contains the index numbers 1-12 that indicate which of the style group elements are used for each block.  FILLTYPE should be Multicolor.

CherylMac
Obsidian | Level 7

Thanks for your reply. If I understand you correctly, I only need to add a new numeric column (1,2,3) to my data table then put the name of that column equal to BLOCKINDEX. The number should match the color of the style group element I want to use for each value. Is that correct?

 

No wonder I couldn't find a code example! I will give this a try and report back.

CherylMac
Obsidian | Level 7

Thank you Sanjay. Your explanation helped me understand what I needed to do.

hackathon24-white-horiz.png

2025 SAS Hackathon: There is still time!

Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!

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.

SAS Training: Just a Click Away

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

Browse our catalog!

Discussion stats
  • 3 replies
  • 1982 views
  • 0 likes
  • 2 in conversation