[R-SIG-Mac] R 2.7 mac Quartz problems
Simon Urbanek
simon.urbanek at r-project.org
Thu May 22 16:09:59 CEST 2008
Dan,
can you, please, send us some examples (screenshots and possibly some
reproducible code)? More comments inline ..
On May 21, 2008, at 6:10 PM, Dan Rabosky wrote:
> I have two questions concerning R 2.7. I'm running OSX 10.4.11. I
> have simply installed R 2.7 from the pre-compiled binary available on
> CRAN.
>
First, I want to clarify whether you read the R for Mac FAQ 12.8 which
describes how you can get results consistent with the old Quartz
behavior:
12.8 Why are Quartz plots much bigger than they used to be?
R versions before 2.7.0 had a Quartz window that was smaller both in
size and scale. This was caused by two “bugs”: all devices in R have a
default size of 7 inches. Quartz used a default of 5 inches and that
was now changed to match all other devices. In addition, Quartz was
incorrectly assuming a resolution of 72dpi for all screens. This means
that a plot was drawn at ca. 3/4 of its intended size (given that most
modern monitors use 100 dpi or more). The new Quartz device correctly
detects the resolution of a screen by default and thus the plots will
appear larger than they used to be. The resolution can be set using
the dpi parameter of Quartz, i.e. to obtain the old behavior use
quartz(width=5,height=5,dpi=72) When creating a new Quartz device. If
you want to make this your default, use quartz.options(width=5,
height=5, dpi=72). You can also set those options in the Quartz
Preferences of the R.app GUI.
Let us know whether that addresses your issues or you have something
else in mind.
> (1) Plot parameters from R 2.6 not compatible with R 2.7: I have
> many scripts that plot manuscript figures and have invested many
> hours into formatting - particularly margins etc. However, when I run
> my scripts (which worked fine on R 2.6), the margins are bizarre,
> often plotting off the bottom of the quartz window, which doesn't
> make any sense in light of the mar and oma params I've specified. It
> is as though none of the plot parameters that worked for R 2.6 map
> onto R 2.7. I'm concerned by this. Does anyone have a simple
> explanation for this and/or a simple solution for a fix?
>
> In Peter Dalgaard's posting, "CHANGES IN R VERSION 2.7.0", I find the
> following:
>
> "The setting of the line spacing (par("cra")[2]) on the X11() and
> windows() devices is now comparable with postscript() etc, and
> roughly 20% smaller than before (it used to depend on the
> locale for X11). (So is the pictex() device, now 20% larger.)
> This affects the margin size in plots, and should result in
> better-looking plots."
>
> I don't see how this alone can explain the major problems I am
> having. I cannot get the bottom rows of some multi-panel plots to
> even fit in the quartz window.
>
>
> (2) Missing fonts in R 2.7: Can't find the serif fonts, eg, family =
> 'serif' argument causes problems and no text is displayed from mtext
> () or text(). I get the message:
>
> In title(main = main, sub = sub, xlab = xlab, ylab = ylab, ... :
> font "Times-Roman" could not be found
>
Yes, this seems to be a Tiger-specific issue. It works fine on
Leopard. I'll see what we can do about it.
Thanks,
Simon
More information about the R-SIG-Mac
mailing list