ggeasy
ggeasy copied to clipboard
Set vjust in easy_rotate_x_labels()?
trafficstars
The default vjust looks a bit awkward to me. I know I can set with #18, what's a good default?
library(tidyverse)
data <- tibble(a = 1:3)
data %>%
ggplot(aes(a, a)) +
geom_point() +
ggeasy::easy_rotate_x_labels()

data %>%
ggplot(aes(a, a)) +
geom_point() +
theme(axis.text.x = element_text(angle = 90, hjust = 1, vjust = 0.5))

Created on 2020-07-05 by the reprex package (v0.3.0)
I agree - centering looks good.
As a default 0.5 makes sense, but vjust can be tricky on axis rotation when the tick text is wrapped. In such cases 0.5 doesn’t work well from past experience.
Related feature could be to justify text after rotation. When you have longer labels it looks weird since they are staggered due to the default justification to the left (down) if I remember correctly.