Skip to content
Prev 207821 / 398506 Next

quartz() and dpi

Hi,

I think it's a bug in quartz(). The following example uses png() with
cairo or quartz backends, and only cairo respects the size and
resolution (as verified in Adobe Photoshop).

 png(file="foo-300.png", type="quartz", units="in",width=5, height=3, res=300)
 plot(1,1)
 dev.off()

 png(file="foo-300.png", type="cairo", units="in",width=5, height=3, res=300)
 plot(1,1)
 dev.off()

As far as I can tell the Cairo device (CairoPNG) doesn't respect the
size either. It looks like your best option is to switch between pdf()
and png(type="cairo") using a wrapper like ggplot2::ggsave.

Best,

baptiste

sessionInfo()
R version 2.10.1 RC (2009-12-06 r50690)
i386-apple-darwin9.8.0

locale:
[1] en_GB.UTF-8/en_GB.UTF-8/C/C/en_GB.UTF-8/en_GB.UTF-8

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base

other attached packages:
[1] Cairo_1.4-5

loaded via a namespace (and not attached):
[1] tools_2.10.1
On 28 January 2010 02:23, JiHO <jo.lists at gmail.com> wrote: