[Pythonmac-SIG] Rpy in various interfaces

Jan de Leeuw deleeuw@stat.ucla.edu
Sat, 4 Jan 2003 12:03:40 -0800


R is a statistics environment. All of R can be compiled into a dylib,
and the Rpy package on Sourceforge allows you to do R from
Python. R has various graphics devices for its plotting etc, there
is pdf(), x11(), eps(), jpeg() etc, which open these devices and
make them the current device.

Now I am interested in the situation where the device is X11.

If I run python (latest CVS build of 2.3a) from the terminal I can say

from rpy import *
r.x11()

and my device opens, a graphics window appears, and I can plot.
In fact I dont even have to say r.x11() explicitly, because from the
terminal that's the default device (if there is a X server running).

If I give the same commands from interactive mode in PythonIDE
it crashes. On the other hand

from rpy import *
r.x11(display='gifi.stat.ucla.edu:0.0')

works fine.

If I give either of these commands from IDLE, it crashes. Now this
does not surprise me, because there can be all kind of nasty
interactions between plotting modules and event loops.

===
Jan de Leeuw; Professor and Chair, UCLA Department of Statistics;
Editor: Journal of Multivariate Analysis, Journal of Statistical  
Software
US mail: 9432 Boelter Hall, Box 951554, Los Angeles, CA 90095-1554
phone (310)-825-9550;  fax (310)-206-5658;  email: deleeuw@stat.ucla.edu
homepage: http://gifi.stat.ucla.edu
   
------------------------------------------------------------------------ 
-------------------------
           No matter where you go, there you are. --- Buckaroo Banzai
                    http://gifi.stat.ucla.edu/sounds/nomatter.au
   
------------------------------------------------------------------------ 
-------------------------