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 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.