Skip to contents

Scatterplot with regression line and densites by grouping variable. Use this to evaluate overlap.

Usage

regplot_dens(df, xvar, yvar, zvar, title = "")

Arguments

df

dataframe

xvar

x variable

yvar

y variable

zvar

z variable (coerced to factor)

title

plot title

Examples

regplot_dens(mtcars, wt, mpg, am)
#> Loading required package: ggExtra
#> `geom_smooth()` using formula = 'y ~ x'
#> `geom_smooth()` using formula = 'y ~ x'
#> `geom_smooth()` using formula = 'y ~ x'