Hi ggplot users,
I want to plot three panels on one figure, and remove the legends of 2nd and 3rd panels but keep the legend space. So I use the code below:
g2 <- ggplotGrob(plot3)
g2[['grobs']][[which(g2$layout$name=='guide-box')]][['grobs']] <-NULL
g3 <- ggplotGrob(q1)
g3[['grobs']][[which(g3$layout$name=='guide-box')]][['grobs']] <- NULL
figcom <- gridExtra::grid.arrange(plot1.2,g2,g3)
But it has the warning, where is the problem and should I check? Thanks.
Error in grid.Call(C_textBounds, as.graphicsAnnot(x$label), x$x, x$y, :
polygon edge not found