The only support that pyqtgraph has with matplotlib is that you can export windows to a matplotlib window, there is a little more in the documentation here: https://pyqtgraph.readthedocs.io/en/latest/exporting.html#export-formats
Trying to use both matplotlib and pyqtgraph at the same time will likely lead to unintentionally bad behavior from some issues w/ QApplication I would imagine. If you specify a non Qt back-end of matplotlib, it might work, but this is fairly untested, and I would generally not recommend. On Tue, May 17, 2022 at 1:21 PM ML___ <[email protected]> wrote: > Hello, > > Thanks to all those who've worked on PyQtGraph. I switched to it for a > real time plotting app as I was bogging down Matplotlib. > It's easy to use, highly flexible, and fast! > > I'm seeing a similar issue as was reported in 2012, where importing > pyqtgraph stops matplotlib from showing plots: > > --------------------my code------------------------------ > import matplotlib.pyplot as plt > plt.ion() > plt.show() > plt.plot([1,2,3,4]) # 1) call succeeds, interactive plot window is shown > import pyqtgraph # 2) after this call the existing plot window from (1) > is unresponsive > plt.plot([4,3,2,1]) # 3) function succeeds as in (1), but plot window > is not updated, and remains unresponsive > ----------------------------------------------------------------- > > I'm running Debian Testing (bookworm) recently updated > Python 3.10.4 > pyqtgraph.__version__ = 0.12.4 > matplotlib.__version__ = 3.5.1 > > Regards, > Michael > > > > > > > On Monday, October 8, 2012 at 10:27:35 PM UTC-7 Jianbao Tao wrote: > >> Hi, >> >> I am playing with pyqtgraph recently. I am impressed by its speed. :-) >> However, there is one thing that really bothers me: It doesn't appear to >> be compatible with matplotlib, which is very strange, considering the fact >> that pyqtgraph and matplotlib have their own name space. Here is a snippet >> that demonstrates that problem. >> >> #--------------------- code ---------------------------------- >> import matplotlib.pyplot as plt >> import numpy as np >> x = np.arange(100) >> plt.plot(x) # Working >> plt.show() >> >> import pyqtgraph >> plt.plot(x) # Not working >> #----------------------- end of code ------------------------- >> >> Cheers, >> Jianbao >> >> -- > 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/496afc6c-3c4c-44e0-bb28-2f1ef7c67860n%40googlegroups.com > <https://groups.google.com/d/msgid/pyqtgraph/496afc6c-3c4c-44e0-bb28-2f1ef7c67860n%40googlegroups.com?utm_medium=email&utm_source=footer> > . > -- 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/CA%2BnduTEUKQ%3DXts6xY4L%2BpW6H%3Dafh9BkidpW%3DJfwKBHLpHvbxSA%40mail.gmail.com.
