Re: [R] ggplot2: font size mismatch for pdf output

From: hadley wickham <>
Date: Tue, 13 May 2008 08:23:37 -0500

> 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)



______________________________________________ mailing list
PLEASE do read the posting guide
and provide commented, minimal, self-contained, reproducible code.
Received on Tue 13 May 2008 - 13:27:49 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Tue 13 May 2008 - 13:30:36 GMT.

Mailing list information is available at Please read the posting guide before posting to the list.

list of date sections of archive