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


This example started with 'real' hospital data, and then the 
data were "washed" and randomized, and then some trends were
manually inserted into the data.  Therefore this sample is no
longer using real data ... but what I call "plausibly real" 

To get different color markers in the plots, I am actually 
plotting several series of data, and "overlaying" them.
I also overlay a line and gray outline markers for all of
the data, to make it look like it's all one continuous 
data line/series.  I also overlay a regression line
(using interpol=rl) to show the data's trend.

The dashed line is a vref (reference line extending from
the vertical axis), based on a value I calculate and 
save as a macro variable.

The text to the right of the graph is put there via annotate.
The values in this text are calculated via proc sql, etc,
and passed along via macro variables.

The 6 graphs, and the overall title page, are put on the same 
page using "proc greplay".  Since each graph is very similar,
I put that code in a macro, so I could re-use it for each graph.

Back to Samples Index