[R-SIG-Mac] differences between quartz and pdf and new questions about preferences in R.app

Denis Chabot chabotd at globetrotter.net
Tue Mar 21 15:20:22 CET 2006


Thanks Simon,

But if pdf and quartz use the same font and font size, shouldn't this  
mean that one "character" is the same width and height, on user's  
scale, on both devices, even though they use different geometry and  
path?

By the way, thank you for mentioning the function quartz.save. I did  
not it existed and there is no entry for it in the help system. At  
least none that I can find.

Also, is it normal that in preferences, one cannot set the default  
font and size? The "change" button (my translation from the  
"modifier" in my french setup) is greyed out.

Until recently I had managed to tell R.app (via preferences) that  
news quartz windows should be 5 x 5 instead of 4.5 x 4.5. Today for  
some reason it was back to 4.5 x 4.5. I went to preferences, changed  
both width and height to 5. New quartz windows were 5 in wide but  
only 4.5 in high. I tried repeatedly to force it to be 5 in high but  
that preference would not stick when I closed the preferences window  
and created a new quartz window. In fact, while the preferences  
window was still open I could see the height being automatically  
reset from 5 to 4.5 just by clicking the button for "location" of new  
quartz windows.

Removing the file org.R-project.R.plist and having R.app create a new  
one did not solve this, height was still being reset to 4.5. Finally  
I got the height to stick to 5 by editing the plist file with plist  
editor. I wonder how I has succeeded in the past. I know it was with  
the preference pane, not the plist editor. All this on version 1.14 
(2129) of R.app.

I tried to get today's nightly built but it would not start (quit  
right away, not able to launch it to even see its built number).

Sincerely,

Denis
Le 06-03-21 à 06:00, Simon Urbanek <simon.urbanek at r-project.org> a  
écrit :
>
> Denis,
>
> On Mar 20, 2006, at 6:11 AM, Denis Chabot wrote:
>
>> I was trying to position text carefully on a graph within a
>> function. However the result was different when I plotted to a
>> quartz device than to a pdf device.
>>
>
> That is to be expected, because the PDF device uses entirely
> different geometry and path for creating the file (namely the
> PostScript device) than Quartz. If you want to create PDF file that
> is WYSIWYG, then you also have to use Quartz for creating the PDF
> file (Save dialog or quartz.save function).
>
>> My function used par("cxy") to compute where to place text. This is
>> indeed part of the problem as calling it when a quartz device is open
>> yields (0.1928571, 0.3857143), whereas for a pdf device I get
>> (0.387766, 0.6151899).
>>
>> Is there a way to set R so that when no font size or family is
>> specified, the same font/size is used by both the pdf and quartz
>> devices?
>>
>
> Yes. They both use the same font (Helvetica) and the same point size
> (12pt). You can, of course, change the default font size using the
> "pointsize" parameter.
>
> Cheers,
> Simon



More information about the R-SIG-Mac mailing list