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
plot(mtcars$disp, mtcars$mpg)
plot(mtcars$disp, mtcars$mpg,
main = 'Displacement vs Miles Per Gallon',
xlab = 'Displacement', ylab = 'Miles Per Gallon')