You can figure out how much time is involved on the front side matplotlib
by using the null backend Template:
This will give you an upper limit on your performance since none of the
rendering costs are shown. If that is already down to e.g., 30 fps then
you will not see anything better from an opengl backend.
Speed improvements in the matplotlib front end may be possible, for
example by representing tics and grids as line collections rather than
rendering each one with a separate path command.
On Mon, Sep 01, 2008 at 12:06:45AM -0700, Kevinsysu wrote:
I'm using matplotlib for plotting in recent days. I love it especially the
usability and the plot quality.
My current work is to display a real time data set update into several 2D
graphs (5 or more, 400x400 graphs).
The environment I'm using is:
Intel P IV 2.4G
Using the wxagg backend.
The issue I encoutered was that the graphs refresh took too much CPU time,
or in other word, the graph is not draw fast enough.
Sorry to raise this performance topic again, as I knew you've discussed a
lot on this topic, there're also some posts related to this, but I just
can't find a solution suite to me.
For single graph sized 400x400, my target is to reach 50 fps. Actually, it
can be easily achieved using the animation method: copy_from_bbox/
restore_region in the following link.
http://www.scipy.org/Cookbook/Matplotlib/Animations. (I reach 90+ fps with
this) The difficulty I got is that the above method is only updating the
bbox area, but I have to update the x/y axis as well. As John indicated in
another post, updating the x/y axis is the bottleneck of the draw process.
When I update the x/y axis at the same time, the performance drops to 20+
fps, which is lower than my requirement.
Below are my questions, any kind of answer or hints would be appreciated:
1. Can I reach the performance requirement by using the wxagg? If yes, how
can I get there?
2. Is there any existing backend can reach the performance requirement? Can
it be embedded with wxpython?
3. What differences (especially performance aspect) between the wxagg and
4. As I know, in the recent post, Paul Kienzle is planning to develop the
opengl backend. Could the opengl backend have a great improvement on
performance compare with the wxagg?