Reputation: 23
I used the following code to change the height of the strip background on facets. But it seemed not efficient for the second row.
library(reshape2)
library(grid)
library(gtable)
library(ggplot2)
gp <- ggplot(data = tips, aes(x = total_bill, y = tip/total_bill)) + geom_point() + facet_wrap( ~ day, ncol = 2)
g <- ggplotGrob(gp)
g$heights[[3]] = unit(0.3, 'in')
g$grobs[[6]]$heights <- g$grobs[[7]]$heights <- g$grobs[[8]]$heights <- g$grobs[[9]]$heights <- unit(1, 'native')
grid.draw(g)
Upvotes: 1
Views: 315