How to get interactive update (live-plot) for pyqtgraph in jupyter?

19 views
Skip to first unread message

Eugene E.

unread,
Dec 8, 2018, 10:58:15 AM12/8/18
to Project Jupyter
Hi all!

I have the data stream I would like to plot immediately in pyqtgraph, here is an MWE:

%gui qt

import numpy as np
import pyqtgraph as pg
from time import sleep

win
= pg.GraphicsWindow()
qplt
= win.addPlot()
curve
= qplt.plot()


for i in range(8):
    sleep
(.5)
    curve
.setData(np.random.random(size=16))

but it only updates the plot window once the cell calculation is complete. How to force an update and a redraw?
Reply all
Reply to author
Forward
0 new messages