Click here to see the SAS code.
Click here to see the example.


This is a sas/graph imitation (and slight enhancement) of the following graph:

(Note that my graph is only using estimated values, since I didn't have the 
raw data that the original graph was created with.)

I start with "proc gchart" doing a grouped bar chart (to get the 3 side-by-side bars),
and then I annotate the "overall" wide gray bar behind the group.

One "trick" is that I assign a numeric variable to get the bars in the order I want
(otherwise the groups of bars would be sorted alphabetical by country, or I would
have to hard-code the order by hand in an axis statement), and I use a user-defined
format (which I create on-the-fly, from the data) to make the numbers print as the
country name.

I use axis statements to suppress a bunch of the default axis stuff.

I use annotate to draw a line from the group of bars, down to the country name.
(I think this looks better than how they did it in the original.)

I use the annotate 'pie' function to draw the each pie slice for eachpie.
Annotate pies want to start at the 3pm position, so I had to add some offset
values to get them to start at the 'noon' position.

Everything else (including the "key/legend" example bar chart) is done with 
annotate - it was a bit tedious, but came out looking pretty good, imho.
Note that my legend is a little more clear than the original, in connecting
the pieces of the legend to their descriptive text.

Back to Samples Index