# Load built-in dataset
data(mtcars)
# Create scatter plot
plot(
mtcars$hp,
mtcars$mpg,
xlab = "Horsepower (hp)",
ylab = "Miles per Gallon (mpg)",
main = "Miles per Gallon vs Horsepower",
pch = 19
)
There is a slight negative relationship between mpg and hp.