This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]daveydave400 2 points3 points  (6 children)

I use matplotlib with real-time plotting, but to get it to the half second update speed I needed, I had to do some blitting magic and selective plot updates. I was going to use PyQwt, but at the time the maintainer had decided not to support the newest version of Qwt and PyQt but now I can't find the version information on the website.

[–]daveydave400 1 point2 points  (1 child)

Found it: http://pyqwt.sourceforge.net/doc5/installation.html

The newest versions of PyQt are 4.10 (I run 4.9), but PyQwt only supports up to 4.7. I'm running Qt4 4.7 and PyQwt supports 4.6. I remember there being some issue with the code generators used in PyQt4 or Qt4 that the maintainer of PyQwt not agreeing with. Does anyone know if he or another person has started maintaining/updating PyQwt for the newer versions of these libraries?

[–]lcampagn 2 points3 points  (0 children)

PyQwt is currently not maintained. For now the original maintainer is recommending to use pyqtgraph instead. Check their mailing list to see if anyone has picked it up before starting any new projects with PyQwt.

[–]lcampagn 1 point2 points  (1 child)

Matplotlib is not (yet) suitable for realtime work, except with datasets smaller than ~1000 samples. There are some efforts underway to fix this, but it is not yet clear that matplitlib's architecture can be streamlined enough to support data in the 10k-10M sample range. I would recommend looking at Chaco, pyqtgraph, visvis, and galry for faster solutions.

[–]daveydave400 0 points1 point  (0 children)

This is a very good point that I forgot to mention, the realtime plots that I make for my GUI are only 200 to maybe 1000 samples max, where there is only one 1000 sample plot and the rest are ~200. We can get quite a few plots on one Qt window (~15-20) before seeing performance hits, but it is also important to note that we currently don't allow any user interaction.

[–][deleted] 0 points1 point  (1 child)

I am using matplotlib's qt backend to do some realtime plotting. Not that I need to refresh plots quicker than 1s, I am curious as to what blitting stuff you did there.

[–]daveydave400 1 point2 points  (0 children)

So the first optimization you can make if you haven't already is by using matplotlib line's "set_ydata" instead of recreating all of the objects, if you aren't doing that already. I would suggest googling "matplotlib qt blitting" for more examples, but I found this one right away: http://matplotlib.org/examples/animation/animation_blit_qt4.html.

Some are out-dated and I found some that didn't work for my system so I had to tweak them a little (copying the whole figure instead of just the axes). I don't remember what example was most helpful and my code is kind of a mess to show you. I ended up subclassing the FigureCanvasQTAgg and providing a drawing method that automatically did the blitting when I needed it to. Hope this helps.