Re: [R] Saving multiple plots using tiff function
Thanks Uwe, I am gald to hear there is a fix ! Any chance you could let me knwo if it worked ? 2012/4/12 Uwe Ligges lig...@statistik.tu-dortmund.de On 12.04.2012 13:53, Uwe Ligges wrote: On 12.04.2012 13:49, John S wrote: Thanks Berend for your answer! I read the documentation but I dont understand filename =Rplot%03d.tif ? Do you mind sending me what you tried? This is a bug in R. I'll take a look. I think I have a fix, will check and commit later today. Uwe Ligges Best, Uwe Ligges On Thu, Apr 12, 2012 at 7:34 AM, Berend Hasselmanb...@xs4all.nl wrote: On 12-04-2012, at 13:07, John S wrote: Dear R users, I still did not receive an answer to my question and went through the archive with no luck. So what does tiff(filename =Rplot%03d.tif) mean ? Just read the documentation for tiff: ?tiff Why the following code does produce two files? It produces no files for me. Only an error message. tiff(filename =Rplot%03d.tif,width=24,** height=20,units=cm,res=300, pointsize=10, compression = lzw) plot(1) mtext(Fig 1,side=3,line=4,adj=0.50,**padj=2,col=black,cex=1) plot(2) mtext(Fig 2,side=3,line=4,adj=0.50,**padj=2,col=black,cex=1) plot(3) mtext(Fig 3,side=3,line=4,adj=0.50,**padj=2,col=black,cex=1) dev.off() You must specify the antialias argument. Which I did: I set it to none and got 3 .tif (plot) files. So I don't know what's wrong with your stuff. Berend [[alternative HTML version deleted]] __** R-help@r-project.org mailing list https://stat.ethz.ch/mailman/**listinfo/r-helphttps://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/**posting-guide.htmlhttp://www.r-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. __** R-help@r-project.org mailing list https://stat.ethz.ch/mailman/**listinfo/r-helphttps://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/**posting-guide.htmlhttp://www.r-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
Re: [R] Saving multiple plots using tiff function
Dear R users, I still did not receive an answer to my question and went through the archive with no luck. So what does tiff(filename =Rplot%03d.tif) mean ? Why the following code does produce two files? tiff(filename =Rplot%03d.tif,width=24,height=20,units=cm,res=300, pointsize=10, compression = lzw) plot(1) mtext(Fig 1,side=3,line=4,adj=0.50,padj=2,col=black,cex=1) plot(2) mtext(Fig 2,side=3,line=4,adj=0.50,padj=2,col=black,cex=1) plot(3) mtext(Fig 3,side=3,line=4,adj=0.50,padj=2,col=black,cex=1) dev.off() Your help is appreciated, John On Fri, Apr 6, 2012 at 2:26 PM, John S john.smith...@gmail.com wrote: Sorry forgot to mention that I am using windows 7 and R session info R version 2.15.0 (2012-03-30) Platform: i386-pc-mingw32/i386 (32-bit Thanks, John On Fri, Apr 6, 2012 at 2:17 PM, John S john.smith...@gmail.com wrote: Dear R experts, I am trying to save three plots using tiff graphics devices; however the following code only produces two files (Rplot002.tif and Rplot003.tif) showing figures 1 and 3. Here is a simplified ex code tiff(filename =Rplot%03d.tif,width=24,height=20,units=cm,res=300, pointsize=10, compression = lzw) plot(1) mtext(Fig 1,side=3,line=4,adj=0.50,padj=2,col=black,cex=1) plot(2) mtext(Fig 2,side=3,line=4,adj=0.50,padj=2,col=black,cex=1) plot(3) mtext(Fig 3,side=3,line=4,adj=0.50,padj=2,col=black,cex=1) dev.off() Using pdf () produces the correct 3 figures but I want to use tiff images .Any clues why this occurs? I am opening a tiff graphics device and writing plots to files in a loop so I need to have a single call to tiff(). Thanks, John [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
Re: [R] Saving multiple plots using tiff function
On 12-04-2012, at 13:07, John S wrote: Dear R users, I still did not receive an answer to my question and went through the archive with no luck. So what does tiff(filename =Rplot%03d.tif) mean ? Just read the documentation for tiff: ?tiff Why the following code does produce two files? It produces no files for me. Only an error message. tiff(filename =Rplot%03d.tif,width=24,height=20,units=cm,res=300, pointsize=10, compression = lzw) plot(1) mtext(Fig 1,side=3,line=4,adj=0.50,padj=2,col=black,cex=1) plot(2) mtext(Fig 2,side=3,line=4,adj=0.50,padj=2,col=black,cex=1) plot(3) mtext(Fig 3,side=3,line=4,adj=0.50,padj=2,col=black,cex=1) dev.off() You must specify the antialias argument. Which I did: I set it to none and got 3 .tif (plot) files. So I don't know what's wrong with your stuff. Berend __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
Re: [R] Saving multiple plots using tiff function
Thanks Berend for your answer! I read the documentation but I dont understand filename =Rplot%03d.tif ? Do you mind sending me what you tried? On Thu, Apr 12, 2012 at 7:34 AM, Berend Hasselman b...@xs4all.nl wrote: On 12-04-2012, at 13:07, John S wrote: Dear R users, I still did not receive an answer to my question and went through the archive with no luck. So what does tiff(filename =Rplot%03d.tif) mean ? Just read the documentation for tiff: ?tiff Why the following code does produce two files? It produces no files for me. Only an error message. tiff(filename =Rplot%03d.tif,width=24,height=20,units=cm,res=300, pointsize=10, compression = lzw) plot(1) mtext(Fig 1,side=3,line=4,adj=0.50,padj=2,col=black,cex=1) plot(2) mtext(Fig 2,side=3,line=4,adj=0.50,padj=2,col=black,cex=1) plot(3) mtext(Fig 3,side=3,line=4,adj=0.50,padj=2,col=black,cex=1) dev.off() You must specify the antialias argument. Which I did: I set it to none and got 3 .tif (plot) files. So I don't know what's wrong with your stuff. Berend [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
Re: [R] Saving multiple plots using tiff function
So what does tiff(filename =Rplot%03d.tif) mean ? Just read the documentation for tiff: ?tiff A look at ?sprintf might also be useful if you're unfamiliar with the C format specification. %03d is the format spec for a 3-digit decimal number with leading zeroes. *** This email and any attachments are confidential. Any use...{{dropped:8}} __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
Re: [R] Saving multiple plots using tiff function
On 12.04.2012 13:49, John S wrote: Thanks Berend for your answer! I read the documentation but I don’t understand filename =Rplot%03d.tif ? Do you mind sending me what you tried? This is a bug in R. I'll take a look. Best, Uwe Ligges On Thu, Apr 12, 2012 at 7:34 AM, Berend Hasselmanb...@xs4all.nl wrote: On 12-04-2012, at 13:07, John S wrote: Dear R users, I still did not receive an answer to my question and went through the archive with no luck. So what does tiff(filename =Rplot%03d.tif) mean ? Just read the documentation for tiff: ?tiff Why the following code does produce two files? It produces no files for me. Only an error message. tiff(filename =Rplot%03d.tif,width=24,height=20,units=cm,res=300, pointsize=10, compression = lzw) plot(1) mtext(Fig 1,side=3,line=4,adj=0.50,padj=2,col=black,cex=1) plot(2) mtext(Fig 2,side=3,line=4,adj=0.50,padj=2,col=black,cex=1) plot(3) mtext(Fig 3,side=3,line=4,adj=0.50,padj=2,col=black,cex=1) dev.off() You must specify the antialias argument. Which I did: I set it to none and got 3 .tif (plot) files. So I don't know what's wrong with your stuff. Berend [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
Re: [R] Saving multiple plots using tiff function
On 12.04.2012 13:53, Uwe Ligges wrote: On 12.04.2012 13:49, John S wrote: Thanks Berend for your answer! I read the documentation but I don’t understand filename =Rplot%03d.tif ? Do you mind sending me what you tried? This is a bug in R. I'll take a look. I think I have a fix, will check and commit later today. Uwe Ligges Best, Uwe Ligges On Thu, Apr 12, 2012 at 7:34 AM, Berend Hasselmanb...@xs4all.nl wrote: On 12-04-2012, at 13:07, John S wrote: Dear R users, I still did not receive an answer to my question and went through the archive with no luck. So what does tiff(filename =Rplot%03d.tif) mean ? Just read the documentation for tiff: ?tiff Why the following code does produce two files? It produces no files for me. Only an error message. tiff(filename =Rplot%03d.tif,width=24,height=20,units=cm,res=300, pointsize=10, compression = lzw) plot(1) mtext(Fig 1,side=3,line=4,adj=0.50,padj=2,col=black,cex=1) plot(2) mtext(Fig 2,side=3,line=4,adj=0.50,padj=2,col=black,cex=1) plot(3) mtext(Fig 3,side=3,line=4,adj=0.50,padj=2,col=black,cex=1) dev.off() You must specify the antialias argument. Which I did: I set it to none and got 3 .tif (plot) files. So I don't know what's wrong with your stuff. Berend [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
[R] Saving multiple plots using tiff function
Dear R experts, I am trying to save three plots using tiff graphics devices; however the following code only produces two files (Rplot002.tif and Rplot003.tif) showing figures 1 and 3. Here is a simplified ex code tiff(filename =Rplot%03d.tif,width=24,height=20,units=cm,res=300, pointsize=10, compression = lzw) plot(1) mtext(Fig 1,side=3,line=4,adj=0.50,padj=2,col=black,cex=1) plot(2) mtext(Fig 2,side=3,line=4,adj=0.50,padj=2,col=black,cex=1) plot(3) mtext(Fig 3,side=3,line=4,adj=0.50,padj=2,col=black,cex=1) dev.off() Using pdf () produces the correct 3 figures but I want to use tiff images .Any clues why this occurs? I am opening a tiff graphics device and writing plots to files in a loop so I need to have a single call to tiff(). Thanks, John [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
Re: [R] Saving multiple plots using tiff function
Sorry forgot to mention that I am using windows 7 and R session info R version 2.15.0 (2012-03-30) Platform: i386-pc-mingw32/i386 (32-bit Thanks, John On Fri, Apr 6, 2012 at 2:17 PM, John S john.smith...@gmail.com wrote: Dear R experts, I am trying to save three plots using tiff graphics devices; however the following code only produces two files (Rplot002.tif and Rplot003.tif) showing figures 1 and 3. Here is a simplified ex code tiff(filename =Rplot%03d.tif,width=24,height=20,units=cm,res=300, pointsize=10, compression = lzw) plot(1) mtext(Fig 1,side=3,line=4,adj=0.50,padj=2,col=black,cex=1) plot(2) mtext(Fig 2,side=3,line=4,adj=0.50,padj=2,col=black,cex=1) plot(3) mtext(Fig 3,side=3,line=4,adj=0.50,padj=2,col=black,cex=1) dev.off() Using pdf () produces the correct 3 figures but I want to use tiff images .Any clues why this occurs? I am opening a tiff graphics device and writing plots to files in a loop so I need to have a single call to tiff(). Thanks, John [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.