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

Here is an example of how you can do a "tornado diagram"
in sas/graph.  I use gplot rather than a gchart hbar, because
gchart bar segments must always touch 'zero' on the raxis,
and gplot does not have this limitation.  To create the 'bars'
in gplot, I use a "thick" line segment (see the large w=
value in the symbol statement).  I insert 'missing' value
between the line segments, and I use the 'skipmiss' gplot
option to tell it to not connect the pieces of the line
where it encounters a 'missing' value.  To get the pieces
in the correct order (larger on top, and smaller on bottom)
I sort the data, and then assign an 'order' variable.
I want labels to show up along the left-hand side, rather
than the 'order' number -- I could use a user-defined format,
but I chose to use annotate to place these labels.


Back to Samples Index