I'm creating a plot where I am using strip.position to adjust the position of facet labels. I find that when I do this, the angle argument in theme(strip.text=element_text(angle=*)) no longer has any effect on the rotation of the labels.
Here's a minimal example:
MinimalExample <- function(angle){
df <- data.frame(x=rnorm(1000), y=as.factor(sample(1:2, 1000, replace=T)))
library(ggplot2)
ggplot(df, aes(x=x)) + geom_histogram() + facet_wrap(~y, ncol=1, strip.position="left") + theme(strip.text = element_text(size = 12, angle=angle, color="blue")) + ggtitle(paste0("Angle:", angle))
ggsave(paste0(angle, ".pdf"))
}
I'm attaching the result for angle=0 and for angle=90. They look the same. Does anybody know a way I can rotate these strip labels?