A scatter plot displays the relationship between two continuous variables. In ggplot2, we can build a scatter plot using geom_point()
. Scatterplots can show you visually
library(ggplot2)
library(dplyr)
library(tidyr)
ggplot(mtcars) +
geom_point(aes(disp, mpg))
ggplot(mtcars) +
geom_point(aes(disp, mpg), position = 'jitter')