# Option 1: Using Base R
# Load built-in dataset mtcars
data(mtcars)
# Create scatter plot: mpg vs hp
plot(mtcars$hp, mtcars$mpg,
main = "Miles per Gallon vs Horsepower",
xlab = "Horsepower (hp)",
ylab = "Miles per Gallon (mpg)",
pch = 19, # solid circle points
col = "blue") # color of points
There is a slight negative relationship between mpg and hp