BookmarkSubscribeRSS Feed
deleted_user
Not applicable
Hi,

I'm trying to convert some 9.2 gbarline code to 9.1.3 and while I have acheived it to an extent I am having problems with a couple of items. My main issue is how to create a legend but I am also having an issue with assigning multiple colours to an individual bar.

Rather than pasting both sets of code here I thought I'd see if anyone could help first. Happy to provide the code if you would like to see what I've done.

I believe the annotate function may be the way forward but it looks fairly cumbersome alongside the legend function and I just wanted to make sure I wasn't going about things the long way.

Many thanks

Dave
3 REPLIES 3
GraphGuy
Meteorite | Level 14
The gbarline procedure is fairly new, and new options & functionality have been added in newer releases (ie, it's an evolving thing). The "subgroup" option (multiple colored segments within a bar) was added in v9.2, and therefore you will not be able to use that option in v9.1.3's proc gbarline.

If you absolutely need a similar graph in v9.1.3, you could use proc gchart to draw the bar chart with sugbroups (multiple colored segments in bars), and then use "annotate" to draw the line.
deleted_user
Not applicable
Thanks Rob, I've just been looking into doing that and it seems the easiest way of doing it, I don't suppose you can point me in the direction of any annotate code that will acheive what I'm after?
I'm trying to learn this as I go against a fairly tight deadline so any help would be appreciated.
Many thanks
Dave

sas-innovate-white.png

Missed SAS Innovate in Orlando?

Catch the best of SAS Innovate 2025 — anytime, anywhere. Stream powerful keynotes, real-world demos, and game-changing insights from the world’s leading data and AI minds.

 

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
  • 1151 views
  • 0 likes
  • 2 in conversation