Python GUI advice

Hi Chris,
I’m adding some Python plotting to our experiments through the client Python Bridge. What do you think is the best way to make plots these days? My plan was to update the plot at the end of each trial, and use matplotlib and the Qt5 backend to display the figure. Are there better web-based backends, or do you have other best-practice approaches to suggest?
thanks,
Mark

Hi Mark,

I don’t do a lot of plotting, so I’m probably not the best person to ask. However, if you want to see how I currently make plots using the Python Script Bridge, have a look at

I always use matplotlib’s default Mac backend (“MacOSX”). This allows my Conduit class to use a combination of pyplot.show() and self._stop_main_loop() to keep the plot window responsive whenever it’s waiting for events (which is most of the time). The Conduit class is meant to be reusable, so you should be able to just pull out conduit.py and use it with your own plotting code.

If you need more info, please let me know.

Cheers,
Chris

Thanks, Chris.
The demo is very helpful.

I did a little testing with the Qt5Agg backend, and it appears to be fast enough for what I need. There, you can hook an update event into the Qt5 main loop.

If you hear of anyone doing bridge plotting with fancier methods, including things like mpld3 (D3 for python) or other browser-frontend plotting, please let me know.

Mark