r - Multiple Plots in one pdf file -


i try this:

for(i in 1:10) {   pdf("filename.pdf",onefile=true)   plot(...) } dev.off() 

and

for(i in 1:10) {   pdf("filename.pdf",onefile=true)   plot(...)   dev.off() } 

but work. how correct code? need every plot new page.

you opening new pdf in loop. try opening pdf beforehand , closing after loop.

pdf("filename.pdf",onefile=true)     for(i in 1:10) {   plot(...) } dev.off() 

Comments

Popular posts from this blog

get url and add instance to a model with prefilled foreign key :django admin -

android - Keyboard hides my half of edit-text and button below it even in scroll view -

css - Make div keyboard-scrollable in jQuery Mobile? -