plotting R graphics with rpy: figure crashes

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Frank

    #1

    plotting R graphics with rpy: figure crashes

    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

Working...