# Basic scatter plot with regression line and equation
plot_scatter(mtcars, "mpg", "wt")
# Scatter plot grouped by cylinder
plot_scatter(mtcars, "mpg", "wt", by = "cyl",
point_color = "blue",
line_color = "red",
se_fill = "#ff000055",
line_size = 0.9,
se = TRUE,
eq_position = c(0.5, 0.95),
ncol_by = 2)
Run the code above in your browser using DataLab