Hey there!
When I have a keylegend on my sgplot with several rows (down = ) and columns (across = ), the legend values get filled across each row first, and then goes down to the next. E.g.
1 2 3 4
5 6 7
Is there an option to easily make it go down first? I know I can make an attribute map, but I was hoping there is an easy option to toggle in the keylegend statement.
1 3 5 7
2 4 6
Thanks!
Michael
In the SG procedures, if you use the DOWN option (without ACROSS), the ORDER is internally set to COLUMNMAJOR. In your case, if you set DOWN=2, you will get the desired result.
Thanks!
Dan
You don't show the code. So I can't tell if you are specifying down= , across= or both.
Try using just the Down= option.
Thanks! I figured it was somewhere. I think converting to GTL is more work than the data attributes map, but maybe only because I don't know how to do it! 😅
In the SG procedures, if you use the DOWN option (without ACROSS), the ORDER is internally set to COLUMNMAJOR. In your case, if you set DOWN=2, you will get the desired result.
Thanks!
Dan
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!
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.