How to save output from ggforce::facet_grid_paginate in only one pdf?

为君一笑 提交于 2019-11-30 15:29:54

You don't even need to use ggsave you can put all these plots into one pdf by:

pdf("~/diamonds_all.pdf")
for(i in 1:6){
  print(ggplot(diamonds) +
          geom_point(aes(carat, price), alpha = 0.1) +
          facet_wrap_paginate(~cut:clarity, ncol = 2, nrow = 2, page = i))

}
dev.off()
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!