geom_smcor | R Documentation |
Scatterplot with trendline and correlation
geom_smcor(
...,
pt_fill = "#00A2CEFF",
pt_color = "black",
pt_size = 2,
ln_color = "black"
)
pt_fill |
fill for geom_jitter (default = "#00A2CEFF") |
pt_color |
color for geom_jitter |
pt_size |
size of points (default = 3) |
ln_color |
color for geom_smooth |
This function combines geom_point, geom_smooth, and stat_cor for ggplot.
USArrests %>%
ggplot(aes(Rape, Murder)) +
geom_smcor()
USArrests %>%
ggplot(aes(Rape, Murder)) +
geom_smcor(pt_fill = "red", pt_color = "yellow", pt_size = 2, ln_color = "orange")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.