Is there any possibility to get high resolution plots in a windows xp system? I tried it with the device function png(filename = "c:/r/highresplot%d.png",pointsize=12, res=900) but when I try to set: width = 480, height = 480 or pointsize = 12, the text is not scaled in the same way as the plots. with regards Knut Krueger http://www.biostatistic.de
Knut Krueger wrote:> Is there any possibility to get high resolution plots in a windows xp > system? > I tried it with the device function png(filename = > "c:/r/highresplot%d.png",pointsize=12, res=900) > but when I try to set: width = 480, height = 480 or pointsize = 12, > the text is not scaled in the same way as the plots.If you really want high quality, why do you choose a bitmaped device rather than non-bitmapped devices such as ps, pdf or wmf? Uwe Ligges> with regards > Knut Krueger > http://www.biostatistic.de > > ______________________________________________ > R-help at stat.math.ethz.ch mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Please read carefully what `resolution' means for a png() device (and a PNG file). It is a hint to the viewer in the file header (often ignored), as described in the R help file. On Tue, 12 Jul 2005, Knut Krueger wrote:> Is there any possibility to get high resolution plots in a windows xp > system? > I tried it with the device function png(filename > "c:/r/highresplot%d.png",pointsize=12, res=900) > but when I try to set: width = 480, height = 480 or pointsize = 12, > the text is not scaled in the same way as the plots.We have no idea what that means. Those arguments are the defaults, and so make no difference to the actual plot. -- Brian D. Ripley, ripley at stats.ox.ac.uk Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272866 (PA) Oxford OX1 3TG, UK Fax: +44 1865 272595
Sorry i sent the answer not to the mailing list - here it is Brian D Ripley schrieb:>On Tue, 12 Jul 2005, Knut Krueger wrote: > > > >>Prof Brian Ripley schrieb: >> >> >> >>>Please read carefully what `resolution' means for a png() device (and a >>>PNG file). It is a hint to the viewer in the file header (often ignored), >>>as described in the R help file. >>> >>> >>> > > >>>On Tue, 12 Jul 2005, Knut Krueger wrote: >>> >>> >>> >>> >>> >>>>Is there any possibility to get high resolution plots in a windows xp >>>>system? >>>>I tried it with the device function png(filename >>>>"c:/r/highresplot%d.png",pointsize=12, res=900) >>>>but when I try to set: width = 480, height = 480 or pointsize = 12, >>>>the text is not scaled in the same way as the plots. >>>> >>>>Ok first: I do not want anybody to get angry and I am the first time in this group. I will make any mistakes like sending you your own help file and I apologize in advance for those mistakes.>Not if you just include those arguments or not. Yes if you include >res=900 or not, but that is not what you said. > >I tried to include res=600 and res=300 there was no difference in the file, both size was 4kb 480*480 Pixel and 150 dpi png(filename = "c:/r/highresplot%d.png",width = 480, height 480,pointsize=12, res=300) png(filename = "c:/r/highresplot%d.png",width = 480, height 480,pointsize=12, res=600) second attempt was to increase width = 480, height = 480 to width = 960, height = 960 png(filename = "c:/r/highresplot%d.png",width = 960, height 960,pointsize=12, res=600) png(filename = "c:/r/highresplot%d.png",width = 480, height 480,pointsize=12, res=300) both is the file size 8kb either with res=300 or res=600 double file size with double size of the device that's what i expected. The letters are nearly unreadable because they are very small - ok png(filename = "c:/r/highresplot%d.png",width = 480, height 480,pointsize=24, res=300) Letters are in the same size as png(filename = "c:/r/highresplot%d.png",width = 480, height 480,pointsize=12, res=300) also that's what I expected, but the quality of the characters is as bad as when I would extract the plot with any graphic application and the small lines from boxplots are sometimes visible sometimes not.>Why aer you sending me a help file I wrote, one which you seem to be >unable to understand? I am not the one failing to notice what it says. >But maybe you are right that I am not understanding the help file, but I hope that clarifies my problems and my mistakes with regards Knut Krueger http://www.biostatistic.de
Dear R-help community, would any of you have a (preferably simple) example of a presentation-quality .png plot, i.e. one that looks like the .eps plots generated by R? I am working with R 2.0.1 in WindowsXP and am having similar problems as Knut Krueger in printing high-quality plots. I have looked at the help file and examples therein as well as others I have been able to find online but to no avail. After many many tries I have to concede I cannot figure it out. I would be very grateful for your help. Regards, Luis -- Luis Tercero, M.Sc. Engler-Bunte-Institut der Universit??t Karlsruhe (TH) Bereich Wasserchemie Engler-Bunte-Ring 1 D-76131 Karlsruhe
Knut Krueger schrieb:>Is there any possibility to get high resolution plots in a windows xp >system? >I tried it with the device function png(filename = >"c:/r/highresplot%d.png",pointsize=12, res=900) >but when I try to set: width = 480, height = 480 or pointsize = 12, >the text is not scaled in the same way as the plots. >There are three bmp based functions available;: bmp, jpeg, png bmp is without compression so I decided not to use it jpeg is no loss less compression so I decided not to use it the third was png Now I tried the other one and I think that there is a bug in the png code or I do not understand the reason: jpeg(filename = "c:/r/Rplot%03d.jpg", width = 960, height = 960, pointsize = 24, quality = 100, bg = "white", res = 2400) witdh/heigth = 960 <> 10.16 mm ppi=2400 Results as expected jpeg(filename = "c:/r/Rplot%03d.jpg", width = 1920, height = 1920, pointsize = 48, quality = 100, bg = "white", res = 2400) witdh/heigth = 1920 <> 20.32 mm ppi=2400 Results as expected bmp(filename = "c:/r/Rplot%03d.bmp", width = 1920, height = 1920, pointsize = 48, bg = "white", res = 2400) witdh/heigth = 1920 <> 20.32 mm ppi=2400 Results as expected png(filename = "c:/r/Rplot%03d.png", width = 1920, height = 1920, pointsize = 48, bg = "white", res = 2400) witdh/heigth = 1920 <> 20.32 mm ppi=150 Result not as expected. Ok I am able to use the jpeg or bmp format, but does anybody know why the png function does not work in the same way as the jpeg and bmp function? Regards Knut