0

I know how to add labels to points in a scatter plot in R using the "text" command, as shown in this question: How can i label points in this scatterplot?

But how can I rotate the text lable so that it runs vertically from the point?

Adrian Tompkins
  • 5,816
  • 3
  • 29
  • 72

1 Answers1

1

Something like this?

ggplot(mtcars, aes(wt, mpg, label = rownames(mtcars))) + geom_point() + geom_text(angle=90,hjust=1.2)
timfaber
  • 1,980
  • 1
  • 14
  • 17