[R-SIG-Mac] quartz.save and tilde

Chabot Denis chabotd at globetrotter.net
Tue May 1 23:57:51 CEST 2007

Hi Simon,

Thanks for the answer and the fix for the tilde. I did not realize it  
was up to you, I thought if R understood tilde, everything else  
having to do with R would. I was wrong.

As for the res question, actually increasing the size of the quartz  
window and controlling pointsize accordingly has proven a good enough  
solution. Certainly it is much easier than to take a quartz plot and  
try to imitate it in all details using the png device.

Le 07-05-01 à 17:12, Simon Urbanek a écrit :

> DEnis,
> On May 1, 2007, at 4:04 PM, Chabot Denis wrote:
>> Until now, I've been able to use the tilde to replace "/Users/ 
>> chabotd" in all my R scripts, be it directly or with the use of  
>> "paste".
>> I am experimenting with quartz.save to produce png files to save  
>> the step of producing pdf and transforming them into png later. I  
>> need png to reduce file size for a series plots with thousands of  
>> points, even though I prefer vector drawings for most situations.
>> I have not been able to find any documentation on quartz.save, but  
>> if I include the tilde in the file name, something that works with  
>> pdf or png devices, it does not work (for me) with quartz.save. I  
>> need to give the unabridged path.
>> Is there a reason for this?
> Yes, the tilde is not expanded. Why is it not expanded? Because the  
> author didn't think of it ;). It's fixed now.
>> Also, what are the options in quartz.save? I've only managed to  
>> use file="path and file"  and type="png" or type="pdf". I've tried  
>> to control resolution (res=300) but it had no effect, so for now I  
>> change the size of the quartz graphics when I call quartz (which  
>> forces me to change pointsize as well to keep proportions of text  
>> relative to drawing size the same.
> file, type and device are the only options of quartz.save and the  
> purpose is to save the image "as-is", directly from the Quartz  
> window, so res doesn't make sense here (it would no longer be a  
> direct snapshot of the window). I guess it would be possible to do  
> what you described, though (Quartz->PDF->PNG of any resolution).  
> I'll see if there is an easy way to do that ...
> Cheers,
> Simon

More information about the R-SIG-Mac mailing list