Click here to see the SAS code.
Click here to see the example.
You've probably *never* seen an example like this done with
sas/graph - this is a testament to sas/graph's flexibility, and
to the fact that you can do "anything" with liberal use of
annotate ;)
I start with a gplot.
I use a user-defined format so that the y-axis is in the order
that I want, and has the labels that I want (ditto for the x-axis).
I annotate the labels along the top of the chart.
I annotate some rectangular polygons with text labels at the top/right
of the chart, to serve as the legend color-key.
In the gplot, I actually annotate the colored balls, to get them in
the exact size & color that I wanted. I use annotate's "html" variable
to store the html title= charttip/flyover-text, so you can mouse over
the balls in IE browser and see the exact data values.
A lot of this is "hardcoded" for the proof-of-concept, but much
of it could be generalized, if someone wanted to modify it to do
similar charts with slightly different data.
-----
Interesting note: When I was creating this sas version, I found an
error in the original chart (I contacted the original author and
confirmed that his original non-sas version did indeed have an error :)
The book was "discovering gen, proteo & bioinf.", p. 270
Here is the author's response:
"Robert,
You are correct. The far right -1.5 should be +1.5.
I believe this was corrected for the second print run,
but I am not sure. However, I will pass along your
correction to the appropriate people.
Malcolm Campbell"
Back to Samples Index