Is it possible to have independent strip themes for each variable used in ggplot2 facet_wrap
?
Take this chunk of code as an example:
p1 <- ggplot(mpg, aes(displ, hwy)) +
geom_point() +
facet_wrap(c("cyl", "drv"), labeller = "label_both")
plot(p1)
I would want to have upper strip ('cyl') with a different theme - say, in bold. Additionally, I might want to make 'drv' italic and with a different font type and size. How could I do that?
I was thinking something in the lines of:
p1 <- p1 + theme(strip.text.variable1 = element_text(face = 'bold'),
strip.text.variable2 = element_text(face = 'italic', size = 8)
)
Unfortunately, I couldn't find anything like this in the docs or previous questions.
Cheers
Edit: I made the question a bit more general to be of further help to the community.