Is it possible to have a GUI with plots generated by PyQtGraph and Matplotlib?

639 views
Skip to first unread message

Aquiles J.

unread,
Feb 8, 2017, 11:02:11 PM2/8/17
to pyqtgraph
Hello, 

I want to design a GUI with QT designer that includes 3 plots:

1) Realtime plotting from COM port using PyQtGraph.
2) A 'screenshot' plot of the 1st one, but used in Matplotlib. 
3) Another matplotlib plot that performs additional analysis on the graph presented in point 2.

Is it possible to combine these 3 plots in a GUI? Has anyone else tried it before? I'd use PyQtGraph for everything, but there's some interactive features of Matplotlib I need that I'm not sure PyQtGraph can do at the moment (handling events, point selection, adding markers, erasing those updates, start over). 

Thanks for your time!

vas...@gmail.com

unread,
Feb 9, 2017, 2:33:01 AM2/9/17
to pyqt...@googlegroups.com
Hi,

There is some sample of integration without comments (sorry).
'-' and '+' buttons increases and decreases dynamic matplotlib canvas.
Original idea taken from: http://matplotlib.org/examples/user_interfaces/embedding_in_qt4.html).
I think that at the end you need to convert your Qt designer parts as described in http://stackoverflow.com/questions/18429452/convert-pyqt-ui-to-python and then re-integrate it.

Cheers,
Vasilije

--
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 pyqtgraph+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/pyqtgraph/ddd7a491-ae9e-44b2-8e81-63657028af7a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

matplotlib and pyqtpgraph integration example.py

vas...@gmail.com

unread,
Feb 9, 2017, 10:28:05 PM2/9/17
to pyqt...@googlegroups.com
Just a little repair of the same code - 2 x 'self.glw1 =' is unnecessary.
matplotlib and pyqtpgraph integration example.py
Reply all
Reply to author
Forward
0 new messages