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:
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]]
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]]
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 =
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) |
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)
{
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
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:
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
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
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
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
12 matches
Mail list logo