I wonder that how can we place labels left
or right
side of the facet_grid
strips.
As a reproducible example I would like to start with this example
library(ggplot2)
ggplot(mtcars, aes("", hp)) +
geom_boxplot(width=0.7, position=position_dodge(0.7)) +
theme_bw() +
facet_grid(. ~ vs + am + carb,switch = 'both',labeller = label_both) +
theme(panel.spacing=unit(0.2,"lines"),
strip.background=element_rect(color="grey30", fill="grey90"),
panel.border=element_rect(color="grey90"),
axis.ticks.x=element_blank())+
#strip.placement="outside") +
labs(x="")
The plot which I look for;