Bug 14418 - Sweave : add png device and use quartz for pdf on mac.
Sweave : add png device and use quartz for pdf on mac.
Status: CLOSED FIXED
Product: R
Classification: Unclassified
Component: Mac GUI / Mac specific
R 2.12.0 patched
Other All
: P5 enhancement
Assigned To: Simon Urbanek
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2010-10-20 15:24 UTC by Michael Malecki
Modified: 2011-03-23 13:14 UTC (History)
0 users

See Also:


Attachments
patch for Sweave.R and RweaveLatex.Rd implementing this (10.66 KB, application/octet-stream)
2010-10-20 15:24 UTC, Michael Malecki
Details
the other one was wrong. Oops. (10.66 KB, patch)
2010-10-22 16:13 UTC, Michael Malecki
Details | Diff
defaults to quartz() when capabilities("aqua"); adds "png" option. (6.56 KB, patch)
2010-10-22 16:16 UTC, Michael Malecki
Details | Diff
only do png part; amend Rd also (6.28 KB, patch)
2011-01-04 23:08 UTC, Michael Malecki
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Malecki 2010-10-20 15:24:58 UTC
Created attachment 1135 [details]
patch for Sweave.R and RweaveLatex.Rd implementing this

For some graphics, it would be useful to switch to a png device -- for example detailed vector images in drafts or alternate size-conscious versions of figures. png is a useful device for this, and already includes type argument with "quartz" default.

I think quartz makes nicer pdfs on the mac. This could probably be achieved with getOptions in a different way so that cairo users could take advantage of that device too. I added just a test for 
if (getOptions("device")=="quartz") 
then it uses the quartz device instead of pdf().
Comment 1 Michael Malecki 2010-10-22 16:13:33 UTC
Created attachment 1136 [details]
the other one was wrong. Oops.
Comment 2 Michael Malecki 2010-10-22 16:15:03 UTC
Comment on attachment 1136 [details]
the other one was wrong. Oops.

argh. sorry, messed up again
Comment 3 Michael Malecki 2010-10-22 16:16:21 UTC
Created attachment 1137 [details]
defaults to quartz() when capabilities("aqua"); adds "png" option.
Comment 4 Michael Malecki 2011-01-04 23:08:37 UTC
Created attachment 1163 [details]
only do png part; amend Rd also

I will submit the quartz part (a wrapper like that used in png() separately; I really would like to get png support into the next release.
Comment 5 Brian Ripley 2011-03-23 13:14:27 UTC
jpeg and png added to trunk (and intended from 2.13.0)