# Load the 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)
The scatter plot shows a negative relationship between horsepower and miles per gallon. As horsepower increases, fuel efficiency generally decreases. This indicates that cars with more powerful engines tend to use more fuel.