[R] ggplot2: font size mismatch for pdf output

hadley wickham h.wickham at gmail.com
Tue May 13 15:23:37 CEST 2008


>  There is a bug in ggsave() for bitmap devices: it computes the width and
> height from 'dpi', but it fails to pass that information on to the devices,
> which assume 72dpi.  So what it actually asked for was a
>  8 x 6.67 inch plot at 72dpi.  72dpi would be a better default, as not all
> of the many bitmap devices work correctly at other resolutions (and none did
> prior to R 2.7.0).

Thanks for the bug report.  I've fixed it by changing the default dpi
to 72, and passing res = dpi to the raster devices.  However, in light
of the fact that most devices don't support dpi, I wonder if using
units (like the raster devices) would be more appropriate.  Is there
any likelihood that the vector devices support will support the units
argument in the future?

(I also added support for the tiff device, and fixed a severe bug with
postscript output)

Hadley


-- 
http://had.co.nz/



More information about the R-help mailing list