plotting R graphics with rpy: figure crashes

F

Frank

Hi,

I use rpy to plot functions and have the following problem. When I
execute the following code line by line (start python and then execute
line by line) the resulting figure looks as it should. However, when I
put these lines in a script and execute the script the figure appears
for half a second but then crashes. Using pylab.show() at the end of
the script prevents the crash but now the window is no longer
refreshed (e.g., changing the size of the window makes the contents
disappear).

import pylab
import rpy

x = range(0, 10)
y = [ 2*i for i in x ]
rpy.r.plot(x,y)

I compared already with sys.version if the python version is the same
in both cases (it is). Hence, the problem might be caused by rpy.

Has anyone an idea how to figure that out?

Thanks!

Frank
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,997
Messages
2,570,240
Members
46,828
Latest member
LauraCastr

Latest Threads

Top