On Fri, Jul 3, 2009 at 1:05 PM, guillaume ranquet<granq...@wyplay.com> wrote:
> but something sounds plain wrong, It sounds like there's too much
> useless calculations and data copied.
>

Well, if you think something is wrong, I guess you may have chosen a
wrong tool.
MPL is mainly for 2d plotting, and not very strong for animation
although it supports some.

> would it be a good idea to have an array of 1000 points and shift it
> left every round to add the new point at the end?

Shifting array should be done by numpy, not by matplotlib (I'm not
sure if numpy can do this in place). Anyhow, what actually matter is
that even if you shift the array, matplotlib will draw all the points
in the array every time.

One possible option in your case is to save your plot as an image in
each round. And at the next round, you plot the newly available data
upon the shifted image.

http://matplotlib.sourceforge.net/examples/animation/animation_blit_gtk2.html

Note that the above example requires svn version of matplotlib.

Regards,

-JJ

------------------------------------------------------------------------------
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to