In same window (pg.plot() is pyqtgraph.graphicsWindows.PlotWindow) you
initialize and plot new and new pyqtgraph.graphicsItems.PlotDataItem with
pw.plot(). It is better to initialize PlotDataItem first (pl = pw.plot()),
then just set the data it with setData(). Also your way of using of teml
variable is suspicious, but there isn't memory leak currently.

Cheers,
Vasilije

#Leak:














*import pyqtgraph as pgpw = pg.plot(clear=True)pw.setLabel('left',
text='Temp', units='F')pw.setLabel('bottom', text='Time',
units='n*5sec')pw.setTitle('Temperature')pw.showGrid(True,
True)pw.showLabel('left', True)pw.showLabel('bottom',
True)pw.showLabel('top')pw.setYRange(20, 100,
padding=0)teml=[21,22,43,32]           while True:           pw.plot(teml,
clear=True)    pg.QtGui.QApplication.processEvents()*



#No leak:















*import pyqtgraph as pgpw = pg.plot()pl = pw.plot()pw.setLabel('left',
text='Temp', units='F')pw.setLabel('bottom', text='Time',
units='n*5sec')pw.setTitle('Temperature')pw.showGrid(True,
True)pw.showLabel('left', True)pw.showLabel('bottom',
True)pw.showLabel('top')pw.setYRange(20, 100,
padding=0)teml=[21,22,43,32]           while True:
pl.setData(teml, clear=True)    pg.QtGui.QApplication.processEvents()*



On Thu, Feb 23, 2017 at 8:15 AM, Eric Afyouni <[email protected]> wrote:

> import pyqtgraph as pg

-- 
You received this message because you are subscribed to the Google Groups 
"pyqtgraph" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/pyqtgraph/CAD_qyJrUCgxcwuDHvc-aFDet7LDZzM_jETb9ZBVHvO%2Bsn%2B3YwQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to