有没有办法控制ggplot中刻面上条带的大小?我尝试过使用strip.background=element_rect(size=n)但据我所知,它实际上没有做任何事情.这甚至可能吗?
bap*_*ste 10
手动将绘图转换为gtable可让您调整条带高度,
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(1,"in")
grid.newpage()
grid.draw(g)
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
2947 次 |
| 最近记录: |