par(mfrow=c(1, 2), mar=c(1, 1, 2, 1), pty="s") par(cex=0.7) plot(datasets::cars, ann=FALSE, axes=FALSE, col="gray", pch=16) lmfit <- lm(dist ~ speed, datasets::cars) abline(lmfit) arrows(15, 90, 19, predict(lmfit, data.frame(speed=19)), length=0.1) text(15, 90, "Line of best fit", pos=2) box(col="gray") mtext("abline() & arrows()", side=3, line=0.5) plot(datasets::cars, ann=FALSE, axes=FALSE, col="gray", pch=16) rug(datasets::cars$dist, side=2) box(col="gray") mtext("rug()", side=3, line=0.5)