Embedding pyqtgraph in enaml... how?

258 Views Asked by At

I'm quite new to pyqt and pyqtgraph so my apology if I'm missing basic things.

I have python program that acquires and plots data, where GUI is implemented by enaml. However the speed of MPL Canvas (matplotlib) was intolerably slow for realtime plotting application, therefore I wish to enhance the performance utilizing pyqtgraph. Immediate conflict seen is that enaml needs to have

from enaml.qt.qt_application import QtApplication
app=QtApplication()

while in order to use pyqtgraph the following seems necessary.

from pyqtgraph.Qt import QtGui, QtCore
app = QtGui.QApplication([])

Can enaml and pyqtgraph coexist or can at least embed pyqtgraph within the enaml thread? If someone can give me a clue it would be a great help. Thanks.

1

There are 1 best solutions below

0
On

Yes they can exist together. You can create your own declaration and toolkit widgets or use the one from enamlx.

There's an example https://github.com/frmdstryr/enamlx/blob/master/examples/plot_area/plot_area.enaml