如何更改带 2 行的小平面上的条带高度

How to change the height of the strip on facets with 2 rows

我使用了以下代码来更改小平面上条带背景的高度。但是第二行似乎效率不高

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)

Obtained result

Expected result

g$heights[c(3,7)] <- unit(0.3, 'in')