Data visualization with SAS programming

How do I use BlockIndex with BlockPlot?

Accepted Solution Solved
Reply
Occasional Contributor
Posts: 12
Accepted Solution

How do I use BlockIndex with BlockPlot?

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]


Accepted Solutions
Solution
‎02-13-2017 10:14 AM
SAS Super FREQ
Posts: 1,080

Re: How do I use BlockIndex with BlockPlot?

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


All Replies
Solution
‎02-13-2017 10:14 AM
SAS Super FREQ
Posts: 1,080

Re: How do I use BlockIndex with BlockPlot?

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.

Occasional Contributor
Posts: 12

Re: How do I use BlockIndex with BlockPlot?

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.

Occasional Contributor
Posts: 12

Re: How do I use BlockIndex with BlockPlot?

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

☑ This topic is SOLVED.

Need further help from the community? Please ask a new question.

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