[R] jpeg and pixels

Prof Brian Ripley ripley at stats.ox.ac.uk
Wed Mar 1 10:05:38 CET 2006

On Tue, 28 Feb 2006, Erin Hodgess wrote:

> Dear R People:
> When using the jpeg function for plotting,
> is there a way to set the size in inches, please?
> There is an option for width and height in pixels, but
> not inches.

Further to Marc Schwartz's answer, you can make use of the 'res' argument 
of jpeg() to specify the number of pixels per inch, but it is not very 
likely that your JPEG viewer will take much notice of it.  (Some may make 
use of it when printing, but none that I know of does when displaying on 
screen.  As you can see in the comments in ?windows, it can be impossible 
to get reliable information from the OS about screen resolution.)

You have to design JPEGs for the intended application.

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

More information about the R-help mailing list