Hi,
I am able to create a 3d graph with R using rgl. In R they work fine.
Then I want to use the same stuff in my python script, and it seems to
work, except that the graphs are not interactive.
I use r['readline']("Press <Enter> to exit: ") to make the script wait
so that the graphs are not destroyed immediately.
It happens with the following code:

import rpy2.robjects as robjects
r = robjects.r
x = [1,2]
y = [1,2]
z = [1,2,3,4]
r['library']('rgl')
x = robjects.FloatVector(x)
y = robjects.FloatVector(y)
z = robjects.FloatVector(z)
r['persp3d'](x, y, z)
r['readline']("Press <Enter> to exit: ")

I am using the latest R from (R version 2.10.1 (2009-12-14))
deb http://cran-mirror.cs.uu.nl/bin/linux/ubuntu karmic/

Ubuntu Karmic
Python 2.6.4 (r264:75706, Dec  7 2009, 18:45:15)

rpy2:
2.0.4a-1 
(/var/lib/apt/lists/archive.ubuntu.com_ubuntu_dists_karmic_universe_binary-i386_Packages)

Thanks in advance,

Willem

------------------------------------------------------------------------------
SOLARIS 10 is the OS for Data Centers - provides features such as DTrace,
Predictive Self Healing and Award Winning ZFS. Get Solaris 10 NOW
http://p.sf.net/sfu/solaris-dev2dev
_______________________________________________
rpy-list mailing list
rpy-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rpy-list

Reply via email to