plot(mtcars$mpg, main = "Scatterplot for `mtcars$mpg`")
plot(mtcars$wt, mtcars$mpg,
main = "Scatterplot for `mtcars$mpg` on `mtcars$wt`")
# Functions
library(ggplot2)
qplot(seq_along(mtcars$mpg), mtcars$mpg) +
labs(title = "Scatterplot for `mtcars$mpg`")
ggplot(mtcars, aes(y = mpg, x = wt)) +
geom_point() +
labs(title = "Scatterplot for `mtcars$mpg` on `mtcars$wt`")