I'm plotting mpg ~ wt in the R dataset mtcars and I want either the points replaced by the initial of the car model (rowname), or a legend with the rowname beside the points.
I don't know how to code for the first idea, and I get overlapping labels on the second. Is there a way of just labeling with the initial of the car model?
Stripped of colors, and other flourishes, here is the idea:
plot(mpg ~ wt, data = mtcars); text(wt, mpg, row.names(mtcars))
Sorry about the ugliness... BTW I tried with ggplot2... same sort of issues...
The idea behind the replacement of the points with rowname initial came from the paper on the topic of regression by Harold Henderson: