I would like to move the facet labels (3, 4, 5) to underneath the x values (4, 6, 8). My current code:
library(ggplot2)
ggplot(mtcars) + aes(factor(cyl), wt) +
geom_bar(stat = "summary", fun.y = "mean") +
facet_grid(~gear, switch = "x")
currently, it looks like this:
I'm looking for something that looks like this:
library(ggplot2)
ggplot(mtcars) + aes(factor(cyl), wt) +
geom_bar(stat = "summary", fun.y = "mean") +
facet_grid(~gear, switch = "x") +
theme(strip.placement = "outside")
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With