anon_coder
11/1/2018 - 4:36 PM

Rotate x axis labels ggplot

# hjust justifies to axis, vjust centres the label on the tick mark

ggplot(iris, aes(x = Species, y = Petal.Length)) + 
  geom_boxplot() + 
  theme(axis.text.x = element_text(angle = 90, vjust=0.4, hjust=1))