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

'hasOwnProperty' in javascript -

How to put a lock and transaction on table using spring 4 or above using jdbcTemplate and annotations like @Transactional? -

How to understand 2 main() functions after using uftrace to profile the C++ program? -