1

I'm looking for some suggestions on a Python library that can perform fast 2-D plotting on PyQt5. I need the ability to interactively pan and zoom on the graph and the ability to display data in real-time. It needs to be well documented and have active development. It also needs to be embeddable within a PyQt user interface as a widget.

Matplotlib seems to be the de-facto standard for plotting on Python but comments I've read suggest it has slow performance.

PyQtGraph seems to be the best match for what I'm looking for but it requires PyQt4. Since Qt4 is now no longer being supported by Qt, I don't want to start a new project using Qt4.

Do you know of any other Python libraries that would meet my requirements or is Matplotlib the best choice and is its performance for real-time plotting as bad as some people have indicated?

1

According to the PyQtGraph change log, the upcoming release will have preliminary Qt5 support. Not sure how preliminary though.

PyQtGraph is certainly actively maintained but the Matplotlib community is much larger. If long term maintainability is very important to you, Matplotlib is the safer bet. However, in my experience MatPlotLib is especially slow with image plots, even more so when using Linux.

If I were you I would try them both and see which one works best. Perhaps even make your program work with both libraries for now, and defer your final decision to a future moment.

  • Thanks, titusjan. I obtained the latest development branch of PyQtGraph and it does appear to work with Qt5 but I've only done some basic tests. I'll look into Matplotlib if it doesn't appear to be solid enough. Thanks for the info. – inwhack Feb 5 '16 at 18:02
  • @inwhack, any comments now, a year later ? – denis Feb 2 '17 at 15:51
  • Titusjan here. There was a long awaited PyQtGraph release (0.10.0) three months ago, so PyQt5 is now officially supported. Furthermore, I've found another plot library that seems fast and of good quality: GuiQwt. However, just like PyQtGraph, this is a one-man project and commits are even sparser. – titusjan Feb 2 '17 at 19:40
  • Also, since PyQt 5.7 there are GPL releases of QtCharts and QtDataVisualization. I haven't had the chance to look at them so I don't know if they are good and feature-complete. They are official Qt libraries though, so they are probably supported well. Note that PyQt 5.7 is still very new, not everybody will have it installed. For instance, it won't be included in Anaconda in the short time, see this issue for details. – titusjan Feb 2 '17 at 19:55
  • @denis: I decided to go with PyQtGraph. Recently, PyQt5 support was added to PyQtGraph (version 0.10.0), so I have now upgraded my app to use PyQt5 too. I have found the performance outstanding and it serves my needs very well. – inwhack Feb 3 '17 at 16:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.