简体   繁体   English

如何在R中结合几个单独的pdf图创建一个pdf

[英]How to create one pdf combining several individual pdf plots in r

I have a few r pdf plots that are generated individually. 我有一些单独生成的r pdf图。 I want to put all these plots together and create a single pdf file containing all the plots. 我想将所有这些图放在一起,并创建一个包含所有图的单个pdf文件。 For example, suppose I have 6 pdf files namely "1.pdf", "2.pdf", ..., "6.pdf". 例如,假设我有6个pdf文件,即“ 1.pdf”,“ 2.pdf”,...,“ 6.pdf”。 I want to create a single 3x2 pdf file naming "combine.pdf" where I will have the above mentioned 6 pdf files. 我想创建一个单独的3x2 pdf文件,命名为“ combine.pdf”,其中将包含上述6个pdf文件。 I searched online but all of those suggests how to put multiple plots in one pdf file which is not the answer I am looking for. 我在网上搜索,但所有这些建议都建议如何在一个pdf文件中放置多个图,这不是我要的答案。 I will highly appreciate a response to my question. 我非常感谢对我的问题的回答。 Thank you very much in advance. 提前非常感谢您。

Have you tried merge_pdf() in the plotflow package? 您是否在plotflow包中尝试过merge_pdf() The CRAN version appears to be obsolete but you can get it from the GitHub repos with: devtools::install_github("trinker/plotflow") . CRAN版本似乎已过时,但您可以使用以下代码从GitHub存储库中获取它: devtools::install_github("trinker/plotflow") Perhaps there is a good reason to do it after the .pdf are created but layout may help create such a combined plot from your individual plots. 在创建.pdf之后,也许有充分的理由这样做,但是layout可能有助于从您的各个图创建这样的组合图。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM