Hello,

I would like to get periodically updated plots: the data set grows at
some rate (5 numbers/sec) and I would like to update all plots I have
(may be multiple) once in 5 seconds, for example.

I thought of storing Figure objects after creating the plots, then
launch separate thread that would wake up every 5 seconds, copy data
from the source arrays to the Line2D instances (set_data(...)) and call
Figure.draw(..) to update the plot.

I have a few questions to that:

1. Would it be possible to do only shallow copy of the arrays that are
being plotted so that on redrawing the figure, chanes in the datasets
would be picked up automatically? If not, is Line2D.set_data(...) the
right approach?

2. How can I trigger autoscaling of the figure so that all data can be
displayed? Like the one happening when the figure is first drawn; in the
_ideal_ case deynamic autoscaling would be effected only if the graph
has the default zoom level, so that user-zoom is not reset at every redraw.

3. How do I iterate over all Figure instances (and, consequently, Line2D
instances) that are being displayed? Currently, I store Line2D's that
are returned by pylab.plot(...) to acces them later, but I think there
must be a better way,

I hope I was able to clearly express my problem. Do not hesitate to ask
for more information. Best regards,

Vaclav


-------------------------------------------------------------------------
Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW!
Studies have shown that voting for your favorite open source project,
along with a healthy diet, reduces your potential for chronic lameness
and boredom. Vote Now at http://www.sourceforge.net/community/cca08
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to