[R] PNG resolution

Matthew Walker matthew.walker.1 at ulaval.ca
Tue Jan 26 20:34:16 CET 2010


   Dieter Menne wrote:

Matthew Walker wrote:
  

I expect that if I change only the resolution of an image, although the 
image would have more pixels, if viewed in the same physical size, the 
elements in the image would have the same physical size but with more 
detail. 

    

The sample you provided create figures with the same relative size of text
and title on Windows and R 2.10.1. I remember, however, that I had similar
problem before, so possibly it has been fixed and you are using an older
version or a different operating system.

Also have a look at the Cairo devices; I have used them with good success in
similar cases.

  

   Thank you Dieter for your reply.
   I too am using R version 2.10.1 (2009-12-14), but on Linux.  I compiled it
   against  cairo-1.8.8.   I  tried specifying the cairo device by adding
   'type="cairo"' to the png() call, but it resulted in the same effect.
   I did notice, however, that the centre (0,0) circle is drawn at the same
   physical size for each of the examples.  The same can be said of the outer
   box, and the tick marks.  It is only the main text and the x and y labels
   that change in size.  Is it possible that the text size is somehow dependant
   on the number of pixels in the image?
   Thanks again,
   Matthew


More information about the R-help mailing list