# NOT RUN {
set.seed(2)
mtcars2 <- mtcars
mtcars2[["new"]] <- sample(LETTERS[1:7], nrow(mtcars), TRUE)
library(ggplot2)
unbalanced_facet_axis(ggplot(mtcars2, aes(x=mpg, y=hp)) +
geom_line() +
facet_wrap(~new, ncol=2))
unbalanced_facet_axis(ggplot(mtcars2, aes(x=mpg, y=hp)) +
geom_line() +
facet_wrap(~new, ncol=3), "down")
# }
Run the code above in your browser using DataLab