[R-SIG-Mac] Bug with x11(), Lion and CRAN R 2.13.1

Konis Kjell kjell.konis at epfl.ch
Tue Jul 26 17:19:44 CEST 2011


I had a typo in my original post, fixed below.

On Jul 26, 2011, at 4:56 PM, Prof Brian Ripley wrote:

> 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:
> 
>> 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?
> 
> Why would you expect it to be?  X11(type='Xlib') is, but that is no longer the default on OS X.

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

> x11(type = "Xlib")
> system.time(demo("graphics", echo = FALSE))
   user  system elapsed 
  0.191   0.025   0.496 

> x11(type = "cairo")
> system.time(demo("graphics", echo = FALSE))
   user  system elapsed 
 19.223   9.757  42.559 

> system.time(demo("graphics", echo = FALSE))
   user  system elapsed 
  0.716   1.290   5.626 

> quartz()
> system.time(demo("graphics", echo = FALSE))
   user  system elapsed 
  0.778   0.045   0.861 



>> 
>> Cheers,
>> Kjell
>> 
>> ## (re)start R ##
>> 
>>> x11()
>>> system.time(demo("graphics", echo = FALSE))
>>  user  system elapsed
>> 0.213   0.025   0.517
>>> dev.off()
>> Error in dev.off() : parameter "i" in "mfg" is out of range
>>> dev.cur()
>> X11
>> 3
>>> dev.off()
>> null device
>>         1
>>> dev.cur()
>> null device
>>         1
>>> 
>>> 
>>> 
>>> sessionInfo()
>> 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()
>>> plot(1:10)
>>> dev.off()
>> X11
>> 4
>> Warning message:
>> In dev.off() : Display list redraw incomplete
>>> sessionInfo()
>> 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
>>> 
>> 
>> _______________________________________________
>> R-SIG-Mac mailing list
>> R-SIG-Mac at r-project.org
>> https://stat.ethz.ch/mailman/listinfo/r-sig-mac
>> 
> 
> -- 
> Brian D. Ripley,                  ripley at stats.ox.ac.uk
> Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
> University of Oxford,             Tel:  +44 1865 272861 (self)
> 1 South Parks Road,                     +44 1865 272866 (PA)
> Oxford OX1 3TG, UK                Fax:  +44 1865 272595



More information about the R-SIG-Mac mailing list