ClimateUnboxed
ClimateUnboxed

Reputation: 8057

rotate the labels for a scatter plot in R

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?

Upvotes: 1

Views: 1567

Answers (1)

timfaber
timfaber

Reputation: 2070

Something like this?

ggplot(mtcars, aes(wt, mpg, label = rownames(mtcars))) + geom_point() + geom_text(angle=90,hjust=1.2)

Upvotes: 1

Related Questions