gplots - 100 plots in 1 multi page pdf in R -


i have r script creates 100 plots.
how create 1 single pdf 50 pages?
2 plots on each page.i tried using
par(mfrow=(50,2))
giving error in plot.new() : figure margins large

you want 2 plots per page, need par(mfrow=c(2,1)). r automatically switch next page if ask plot more 2 plots.

pdf("myoutput.pdf") par(mfrow=c(2,1)) (i in 1:100) {   plot(runif(10) } 

should produce 50 pages pdf, 2 plots per page.


Comments

Popular posts from this blog

Command prompt result in label. Python 2.7 -

javascript - How do I use URL parameters to change link href on page? -

amazon web services - AWS Route53 Trying To Get Site To Resolve To www -