[R-SIG-Mac] differences between quartz and pdf
Simon Urbanek
simon.urbanek at r-project.org
Tue Mar 21 01:58:37 CET 2006
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