我试图将此溶液(How can I change the size of the strip on facets in a ggplot?1)在ggplot更改条带大小的面,我有增加高度尺寸编辑条带大小GGPLOT2
library(ggplot2)
library(gtable)
d <- ggplot(mtcars, aes(x=gear)) +
geom_bar(aes(y=gear), stat="identity", position="dodge") +
facet_wrap(~cyl)
g <- ggplotGrob(d)
g$heights[[3]] = unit(5,"in")
grid.newpage()
grid.draw(g)
为什么它的工作方式不同?
较新版本的ggplot2 '有一个彻底改变的方面系统,这就是为什么这不再起作用。 – Axeman