Placing Multiple Plots on One Set of Axes - SAS Programming

To plot DBP versus SBP, and HR(heart rate) versus SBP,on one set of axes, you use the OVERLAY option on the PLOT statement like this:

Example

PROC PLOT DATA=CLIK_2;
TITLE 'Multiple Plots on one set of Axes';
PLOT (DBP HR)*SBP/QVERLA¥?
RUN;

Note this is equivalent to:PLOT DBP*SBP HR*SBP/OVERLAY;

This produces a plot like the one following:

Output from Example - Placing Multiple Plots on One Set of Axes

Output from Example  - Placing Multiple Plots on One Set of Axes

Not too useful! You can't tell which points represent DBP and which points represent HR. Also, when you overlay plots, you only get one set of axes, the set for the first plot mentioned in the PLOT statement. Well, you cannot do anything about the second of these situations other than being prudent with plots you choose to produce,but you can do something to identify which points belong to which plots. See the next example.


All rights reserved © 2018 Wisdom IT Services India Pvt. Ltd DMCA.com Protection Status

SAS Programming Topics