79798669

Date: 2025-10-24 10:49:53
Score: 0.5
Natty:
Report link

It works when you specify plot.background in the theme inside patchworkGrob():

grid.arrange(
  patchworkGrob(pA + 
                  plot_annotation(tag_levels = list(c('A')) )
  ),
  patchworkGrob( plot_spacer() + pD +
                   plot_layout(widths=c(-0.35, 1)) + 
                   plot_annotation(tag_levels = list(c('D'))) & 
                   theme(plot.background = element_rect(fill = "transparent", color="#808080"))
  ),
  nrow=1
)

transparent grobs

My package versions:
ggplot2_3.5.2
gridExtra_2.3
patchwork_1.3.0
ggpubr_0.6.0

Reasons:
  • Probably link only (1):
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: Julian Selke