scatter.with.hist {UsingR} | R Documentation |
Draws a scatterplot of the data, and histogram in the margins. A trend line can be added, if desired.
scatter.with.hist(x, y, hist.col = gray(0.95), trend.line = "lm", ...)
x |
numeric predictor |
y |
numeric response variables |
hist.col |
color for histogram |
trend.line |
Draw a trend line using lm ,
supsmu or lowess . Use NULL for
none. |
... |
Passed to plot command for scatterplot |
Draws the graphic. No return value.
John Verzani
This example comes from the help page for layout
.
data(emissions) attach(emissions) scatter.with.hist(perCapita,CO2)