Re: [R] wait for graph to finish plotting

2010-10-30 Thread news
David Winsemius dwinsem...@comcast.net writes: Aha.. thankyou, I was not aware of that. Now you have changed plotting functions from plot and barplot over to barchart (a Lattice function) and were not aware of FAQ 7.22:

Re: [R] wait for graph to finish plotting

2010-10-28 Thread news
pdf(file = ~/Dropbox/phd/results/graphs/TEST%03d.pdf) for (dataset in c(breastCancer,pima,heartDisease,crx,ionosphere,votes)) { p - eval(parse(text=paste(dataset,Probs,sep=))) m - melt(t(p)) title - titles[[dataset]]

Re: [R] wait for graph to finish plotting

2010-10-28 Thread David Winsemius
On Oct 28, 2010, at 1:27 PM, n...@aleblanc.cotse.net wrote: pdf(file = ~/Dropbox/phd/results/graphs/TEST%03d.pdf) for (dataset in c(breastCancer,pima,heartDisease,crx,ionosphere,votes)) { p - eval(parse(text=paste(dataset,Probs,sep=))) m - melt(t(p)) title - titles[[dataset]]

Re: [R] wait for graph to finish plotting

2010-10-28 Thread Joshua Wiley
Hi aleblanc, Does something like this work? See inline comments for details. ## If you want them in separate files, you might use onefile = FALSE ## I also often find I need to adjust width and height ## which could be done with height = 9, width = 9, for example pdf(file =

Re: [R] wait for graph to finish plotting

2010-10-23 Thread Tal Galili
Could you please paste the exact code you are using? (the one with the pdf and dev.off, outside the loop ) Contact Details:--- Contact me: tal.gal...@gmail.com | 972-52-7275845 Read me: www.talgalili.com (Hebrew) |

Re: [R] wait for graph to finish plotting

2010-10-23 Thread news
David Winsemius dwinsem...@comcast.net writes: On Oct 22, 2010, at 12:50 PM, n...@aleblanc.cotse.net wrote: Tal Galili tal.gal...@gmail.com writes: I suspect that using dev.copy2eps Is not going to help you here. Please try again using: pdf(...) # Check: ?pdf for(i in something) {

[R] wait for graph to finish plotting

2010-10-22 Thread news
I want to plot and then save graphs in a loop. The problem is that the graphs take too long to plot. Execution jumps to the save command (dev.copy2eps) before the plotting has finished, and so the wrong graph is saved. I works fine if I step through slowly command at a time, but I want to do it

Re: [R] wait for graph to finish plotting

2010-10-22 Thread Tal Galili
There are several ways. What I often use is: pdf(...) # Check: ?pdf for(i in something) { plot(things) } dev.off() And it works fine. Contact Details:--- Contact me: tal.gal...@gmail.com | 972-52-7275845 Read me:

Re: [R] wait for graph to finish plotting

2010-10-22 Thread Tal Galili
I suspect that using dev.copy2eps Is not going to help you here. Please try again using: pdf(...) # Check: ?pdf for(i in something) { plot(things) } dev.off() But give pdf() the file path. Make sure you can make it work with simple plots. then check it on your situation, and let us

Re: [R] wait for graph to finish plotting

2010-10-22 Thread Tal Galili
If you do it the way I just wrote, you will get 1 pdf file with many figures inside it. If you want several files, you can use something like: png(filename = Rplot%03d.png) Instead of using pdf in my last example. Keep this outside the loop :) p.s: at this point you probably have numerous open

Re: [R] wait for graph to finish plotting

2010-10-22 Thread news
Tal Galili tal.gal...@gmail.com writes: I suspect that using dev.copy2eps Is not going to help you here. Please try again using:  pdf(...)  # Check: ?pdf  for(i in something)  {     plot(things)  }  dev.off() But give pdf() the file path. Make sure you can make it work with simple

Re: [R] wait for graph to finish plotting

2010-10-22 Thread David Winsemius
On Oct 22, 2010, at 12:50 PM, n...@aleblanc.cotse.net wrote: Tal Galili tal.gal...@gmail.com writes: I suspect that using dev.copy2eps Is not going to help you here. Please try again using: pdf(...) # Check: ?pdf for(i in something) { plot(things) } dev.off() But give pdf() the