Open xhao79 opened 8 years ago
Thanks for reporting the problem.
This is most likely explained by the fact plt.draw()
creates its own event loop.
An approach would be to subclass an existing matplotlib backend.
While PyQt
is different from PythonQt
, here are some hints that should apply:
Related docs:
May be you could try:
plt.show(block=False)
Hello,
following the advice on that topic, I hit a few bugs but I managed to get a working backend to integrated matplotlib in PythonQt. At its current stage, it is probably not perfect. I have two questions:
The code can be found on branch matplotlib of my fork: https://github.com/jmirabel/PythonQt/tree/matplotlib (based on branch patched-6 of this fork).
When using following code in PythonQt, the plotting window has no interaction, for example, zooming, save figures:
I even could not close the plotting window with clicking the 'close button' on the title bar.