Closed
Description
Hello,
I was trying to remove the strip labels. I found that setting strip.text.x = element_blank()
works when there is only one layer of strip labels and yields an error when there are multiple layers of labels. Is there any way to remove the strip labels in the latter case? Many thanks!
# This works:
p1 <- ggplot(mtcars, aes(x = mpg, y = wt)) + geom_point() +
facet_grid(vs + am ~ gear) + theme(strip.text.x = element_blank())
#This does not work:
p2 <- ggplot(mtcars, aes(x = mpg, y = wt)) + geom_point() +
facet_grid(vs + am ~ gear) + theme(strip.text.y = element_blank())
#Error in gtable_add_grob(panel_table, strips$y$right, panel_pos_rows$t, :
# Not all inputs have either length 1 or same length same as 'grobs'