Hi Everyone,
I am trying to run the following simple script to test R graphics using rpy2:
import rpy2.robjects as robjects
r = robjects.r
m = r.matrix(r.rnorm(100), ncol=5)
pca = r.princomp(m)
r.plot(pca, main="Eigen values")
If I run this script from Idle everything works fine.
However if I run this script line by line in the python terminal window then
the graphics appears but no graph is displayed and when I try to move or resize
the
plot it fails and eventually crashes Python.
If I run the script by just double clicking the script file, the graph does
appear this time
but exhibits strange resizing properties, such as only only being patrially
displayed when the
window is maximised. Furthermore the graphics menus (such as file->save
as->jpeg) crash the
R graphics window.
I am very new to Python and rpy2 but have a good deal of experience with R.
Am I missing something? Any help would be appreciated.
My setup is:
OS: Windows XP
Python version: 2.6.2
R version: 2.9.1
rpy2: 2.06 (installed from rpy2-2.0.6.win32-py2.6.msi)
Thanks,
Wayne
_________________________________________________________________
Celebrate a decade of Messenger with free winks, emoticons, display pics, and
more.
http://clk.atdmt.com/UKM/go/157562755/direct/01/
------------------------------------------------------------------------------
_______________________________________________
rpy-list mailing list
rpy-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rpy-list