# Cars2 Example # Plot the cars dataset with using a log-log scale. # Send plots to PDF file. pdf("cars2.pdf") plot(cars, log="xy", xlab = "Speed (mph)", ylab = "Stopping distance (ft)", pch=15, col="navy") title(main="Cars Dataset, Logarithmic Scale") lines(lowess(cars$speed, cars$dist, f = 2/3, iter = 3), col = "red") # Set plotting device back to default. dev.off()