powered by
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", ...)
numeric predictor
numeric response variables
color for histogram
Draw a trend line using lm, supsmu or lowess. Use NULL for none.
lm
supsmu
lowess
NULL
Passed to plot command for scatterplot
plot
Draws the graphic. No return value.
This example comes from the help page for layout.
layout
# NOT RUN { data(emissions) attach(emissions) scatter.with.hist(perCapita,CO2) # }
Run the code above in your browser using DataLab