Hi All,
Just started using pyqtgraph and it's pretty great, love the speed. I've gotten the demos to work pretty easily, but I'm trying to add it to a project that I've been developing using atom as an IDE with the Script plugin and the windows that pyqtgraph creates close instantly. This happens if I run the same file from the terminal too. But if I use pyqtgraph directly from terminal, it's fine.
I've followed the tips from
this thread to no avail. And searching about hasn't yielded anything promising.
This is the demo code that I've been testing:
import numpy as np
import pyqtgraph as pg
import pyqtgraph.multiprocess as mp
import time
pg.mkQApp()
proc = mp.QtProcess()
rpg = proc._import('pyqtgraph')
win = rpg.GraphicsWindow()
plot1 = win.addPlot()
x = np.linspace(0, 10, 10)
y = np.linspace(-5, 5, 10)
curve = plot1.plot(x, y) # x,y can be lists, arrays, etc.
curve.setPen('r')
win.show()
time.sleep(2)
adding time.sleep keeps the window open for the specified interval but also defeats the purpose of interactive plotting...
thanks for any help!