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-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

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