Description Usage Arguments Author(s) References Examples
Adds the tick marks to an unbalanced grouping of
facet_wrap
plots.
1 | unbalanced_facet_axis(ggplot_obj, position = c("up", "down"))
|
ggplot_obj |
An unbalanced ggplot2 |
position |
Either |
Original by Julius (stackoverflow.com). Updated by Mikko Korpela for ggplot2 >= 2.2.0.
http://stackoverflow.com/a/13316126/1000343
1 2 3 4 5 6 7 8 9 10 11 12 13 | 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")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.