Skip to content

Bug with x11(), Lion and CRAN R 2.13.1

3 messages · Brian Ripley, Kjell Konis

#
Hello,

I have just installed R 2.13.1 on a clean install of Lion on a 3 year old iMac with a 2GHz Core 2 Duo. When I run R in the terminal and use the x11 device I get some strange behaviors when I call the dev.off() function. If I plot several times then usually I get the error:

    Error in dev.off() : parameter "i" in "mfg" is out of range

and if I plot only once I get the warning:

    Warning message:
    In dev.off() : Display list redraw incomplete

In both cases, a new x11 window opens (not exactly the expected result of dev.off). Steps to reproduce both cases are given below.

Also, it seems that the x11 device is not 3-4 times faster than the quartz device. Has anyone else noticed this?

Cheers,
Kjell

## (re)start R ##
user  system elapsed 
  0.213   0.025   0.517
Error in dev.off() : parameter "i" in "mfg" is out of range
X11 
  3
null device 
          1
null device 
          1
R version 2.13.1 (2011-07-08)
Platform: x86_64-apple-darwin9.8.0/x86_64 (64-bit)

locale:
[1] en_US.UTF-8/en_US.UTF-8/C/C/en_US.UTF-8/en_US.UTF-8

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

loaded via a namespace (and not attached):
[1] tools_2.13.1
## (re)start R ##
X11 
  4 
Warning message:
In dev.off() : Display list redraw incomplete
R version 2.13.1 (2011-07-08)
Platform: x86_64-apple-darwin9.8.0/x86_64 (64-bit)

locale:
[1] en_US.UTF-8/en_US.UTF-8/C/C/en_US.UTF-8/en_US.UTF-8

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base
#
This is not peculiar to Lion: it does seem something about Apple's X11 
notifier and I've seen it quite often over the years on Leopard ...
On Tue, 26 Jul 2011, Konis Kjell wrote:

            
Why would you expect it to be?  X11(type='Xlib') is, but that is no 
longer the default on OS X.

  
    
#
I had a typo in my original post, fixed below.
On Jul 26, 2011, at 4:56 PM, Prof Brian Ripley wrote:

            
Oops!  That was supposed to say "the x11 device is now 3-4 times faster than the quartz device."  Anyway, here are the timings I get (I expected quartz to be the fastest but not for any particular reason):
user  system elapsed 
  0.191   0.025   0.496
user  system elapsed 
 19.223   9.757  42.559
user  system elapsed 
  0.716   1.290   5.626
user  system elapsed 
  0.778   0.045   0.861