Python Plotting For Embedded Data and Realtime UIs
So we have our data file or stream and now we need to visualize it somehow. We are going to focus on using Python to do this as it is one of the faster ways to go, however there are tons of plotting tools out there that could do the job as well. To get started, we need to select a plotting library to use. There are many out there even just in the Python world, but based purely on widespread use and performance we can narrow this down to…
PyQtGraph or Matplotlib?
Most people looking to use Python to do any sort of plotting are typically pointed at Matplotlib first. This graphical plotting suite is very power and reasonably straight forward to use, and works great with generating static plots and some light weight dynamic stuff. But it doesn’t seem to hold up well when it is put under heavy load or is expected to stream real-time data. For heavy or real-time lifting PyQtGraph seems to be of the few solutions out there when working with Python.
PyQtGraph certainly has it’s quirks and isn’t always the most intuitive to get up and going. However it is very powerful and can efficiently stream and plot large amounts of data. Also as it’s name implies it is build upon Qt which makes it quite easy to integrate into an existing GUI if you are using PyQt or PySide.
Examples
(to be continued…)