Click here to see the SAS code.
Click here to see the example.
---------------------------------------------------------------
I originally saw this example on the Chartjunk webpage.
(See this website for a lively discussion about what people do,
and don't like about this graph, and the data behind it :)
I found Shiller's actual data in a spreadsheet on the following website.
They reference that it came from the Aug 26, 2006 New York Times.
---
The data are read in directly from the spreadsheet using "proc import".
I would have read the data directly from Shiller's website, using a
filename url, but proc import uses "Microsoft Jett" to read the spreadsheet
and Jett doesn't know about SAS' filename url stuff (if it had been a
CSV or Text file, for example, I could have read it directly).
The plotted line is a simple gplot, with a redundant plot2 of the exact
same data to get an additional axis on the right-hand side.
The gray areas behind the line are done using annotated function='bar'.
I suppress the vaxis lines with style=0 on the axis statements.
I suppress certain tickmark values on the left & right axes by using
the value= on the axis statement, and hard-coding certain tickmarks
(t='s) to be blank.
I annotate a white function='bar' on top of the top/left quadrant
of the graph, to cover the dashed reflines, and then I annotate text
on that same area for the long descriptions.
Back to Samples Index