Closed eldond closed 6 years ago
When I launch from the console, I think PyQt
is integrating with the interactive interpreter event loop.
That's why we rely on PyQt to hook into the ipython event loop instead.
https://groups.google.com/d/msg/pyqtgraph/dgXPbme8bDc/qemcEtE2BY0J
So, solving this requires integrating the PyQt event loop with OMFIT's tk event loop.
When using the OMFIT command box to make pyqtgraph figures (no pyqtmpl involved), the same problem occurs. Here's a minimal code snippet you can run in the command box to demonstrate:
import pyqtgraph as pg
from PyQt4 import QtGui
win = pg.GraphicsWindow()
lay = pg.GraphicsLayout()
win.setCentralItem(lay)
ax = pg.PlotItem()
lay.addItem(ax, 1, 1)
ax.plot([1, 2, 3])
QtGui.QApplication.instance().exec_()
Closing because pyqtmpl works as well as any PyQt application could work within a tk based framework. The problem has nothing to do with the pyqtmpl wrapper.
The funny thing is that I can
import pyqtmpl
from the command line and make a figure withsubplots
and have no problems. That is, the figure will update and I also can keep running stuff from the command line. So, I know it's possible. Somehow.