Click here to see the SAS code.
Click here to see the example.
---------------------------------------------------------------
This example shows how to do a pareto chart in sas/graph.
It should be very easy to re-use this example with your own data.
I use the new 'proc gbarline' to get the line-axis on the right-hand side.
But gbarline being a new proc, it doesn't fully support everything you
need to do a pareto chart yet (for example, when you order the bars
descending, the gbarline line is still connected in alphabetical order).
Therefore, I use annotate to actually draw the line, and to do the
dashed reference line at 80% (the reason I'm showing the line at 80%
is to test the theory that 80% of the problems are usually caused by
20% of the problems/bars - you can visually verify this if you know
where 80% is :).
Note also the use of the 'split' character in the axis statement,
to get the text bar labels to split onto 2 lines (this is much easier
to read than angled text).
Back to Samples Index