store arrangeGrob to object, does not create printable object

后端 未结 1 1062
攒了一身酷
攒了一身酷 2020-12-06 11:14

I want to save, but not print (for now), a bunch of ggplot()s into a grid (via arrangeGrob(), correct?), then print and retrieve them late

1条回答
  •  一向
    一向 (楼主)
    2020-12-06 11:40

    The gridExtra package has been updated recently thereby changing how arrangeGrob works internally and what kind of object it returns (now a gtable).

    You need to call grid.draw:

    grid.draw(y)
    

    resulting plot

    Edit: do not use plot() as initially suggested; it will add a grey background, and is only meant to be used for debugging gtables.

    0 讨论(0)
提交回复
热议问题