Python Forum

Full Version: Architecting Efficient Plot
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Trying to conceptually think of good way to update a matplotlib plot with data that comes from the serial port.

I have one (multi)process that is waiting for serial data to come in (randomly every 10ms-10sec), and then I call my matplotlib draw function, but the figure window is totally unresponsive (i.e. hourglass) in between updates. Even though I thought matplotlib runs in its own thread (like pyqtgraph).

What's the preferred method.. should I create another process and have the serial process pushes data to it (via a queue), and then have that process call the matplotlib draw function? Or should I use threads instead of multiprocess?