I have the following code:
label_rev <- function(labels, multi_line = TRUE, sep = ": ") {
label_both(rev(labels), multi_line = multi_line, sep = sep)
}
require(ggplot2)
p <- ggplot(data = mtcars, aes(wt, mpg)) + geom_point()
p + facet_grid(vs + cyl ~ gear, labeller = label_rev)
I get the following figure:
Here is my dilemma: I would like the outerstrip of vs:0 to be only one panel encompassing the three facets (cyl:4, 6, 8) and the outstrip of vs:1 to be one panel encompassing the three facets (cyl:4, 6, 8).
Is it possible to do this using ggplot2?
Thanks again in advance for any help!
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…