The theme theme_minimal
changes a lot of things including the changes you made with theme
. So that you should do it in the other way:
ToothGrowth$dose <- as.factor(ToothGrowth$dose)ggplot(ToothGrowth, aes(x=dose, y=len)) + geom_boxplot() theme_minimal() + theme(axis.text.x = element_text(angle = 90, hjust = 1)) +