Skip to content

differences between quartz and pdf

2 messages · Denis Chabot, Simon Urbanek

#
Hi,

I have never made anything to change the fonts used in quartz and pdf  
devices, so I assume my settings are like everyone else.

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.

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?

For now I've written 2 versions of my function depending on which  
device I want to output to, which is not a great solution.

Thanks in advance,

Denis Chabot
#
Denis,
On Mar 20, 2006, at 6:11 AM, Denis Chabot wrote:

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