On Wed, Apr 22, 2009 at 10:11 AM, Elan Pavlov <epav...@gmail.com> wrote:

> I'm trying to use matplotlib for animating data as it is received from
> an online source (online in the algorithmic
> sense not internet:). I'd like the graph plot to be updated with high
> frequency since the data changes rapidly. I've
> used the BufferRegion with copy_from_bbox / restore_region and it
> speeds up the plotting considerably but alas it's
> still not good enough (with a large number of graphs and a large
> number of data points in each graph).
>
> What I'd like to do is to utilize the fact that the animation is
> updated in a predictable fashion (i.e., scrolling off
> the screen to the left as new data arrives) in order to speed up the
> animation. The idea would be to copy the right 99%
> of the graph (or some other fraction) via some kind of function
> similar to copy_from_bbox, move it 1% to the left and
> then plot the new 1% of the data. The problem is that as far as I can
> tell the copy_from_bbox/restore_region does not
> actually allow changing the area in which it is restored. I've mucked
> around in the source files a bit but to no avail.
>
> My question is then:
> 1. Is there some other way to copy everything enclosed in a Bbox? or
> 2. Is there some way to modify the region in which data reappears when
> using restore_region?
> 3. Perhaps I'm missing something?
>
> It would also be nice if it was possible to transform the plot (i.e.
> make it larger/smaller depending on how the y-axis changes) although I
> suppose this is doable via using an auxiliary canvas.
>
> I'm sure someone else has done this since it seems pretty natural and
> useful for a variety of applications.
>

Without a small example, it's hard to know for sure.  Are you using
Line2D.set_data to update with new data or are you doing a new plot?  Since
you have multiple graphs, have you looked at making a LineCollection object
by hand, which will decrease the number of function calls when drawing?

Just some ideas,

Ryan

-- 
Ryan May
Graduate Research Assistant
School of Meteorology
University of Oklahoma
Sent from Norman, Oklahoma, United States
------------------------------------------------------------------------------
Stay on top of everything new and different, both inside and 
around Java (TM) technology - register by April 22, and save
$200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco.
300 plus technical and hands-on sessions. Register today. 
Use priority code J9JMT32. http://p.sf.net/sfu/p
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to