Description Usage Arguments Details Value Note Examples
Create a scatter plot between two quantitative variables.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
data |
data frame |
x |
quantitative predictor variable |
y |
quantitative response variable |
outlier |
number. Observations with studentized residuals larger than this value are flagged. If set to 0, observations are not flagged. |
alpha |
Transparency of data points. A numeric value between 0 (completely transparent) and 1 (completely opaque). |
digits |
Number of significant digits in displayed statistics. |
title |
Optional title. |
margin |
Marginal plots. If specified, parameter can be
|
stats |
logical. If |
point_color |
Color used for points. |
outlier_color |
Color used to identify outliers (see the |
line_color |
Color for regression line. |
margin_color |
Fill color for margin boxplots, density plots, or histograms. |
The scatter
function generates a scatterplot between two quantitative
variables, along with a line of best fit and a 95% confidence interval.
By default, regression statistics (b, r, r2, p) are printed and
outliers (observations with studentized residuals > 3) are flagged.
Optionally, variable distributions (histograms, boxplots, violin plots,
density plots) can be added to the plot margins.
a ggplot2 graph
Variable names do not have to be quoted.
1 2 3 4 5 6 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.