Displaying data that is changing

Hey Guys,

I want to use matplotlib to plot data that is changing every second, I am thinking that in order to do this i will have to update the data array with the new data ,
and redraw the graph. Is this the recommended way to do it ?

Thanks

···


Leotis Buchanan
Manager/Electronic Design Systems Engineer
Exterbox.com

Leotis buchanan wrote:

I want to use matplotlib to plot data that is changing every second, I am thinking that in order to do this i will have to update the data array with the new data ,
and redraw the graph. Is this the recommended way to do it ?

Depending on what environment you are calling from and how complicated the graph is, remember to do pylab.ioff() and the pylab.ion() before and after your drawing commands to speed up the drawing.

Also, you may want to force the axis size, because axes that change in scale all the time can be distracting

-Kaushik

See the animation cookbook and examples

  http://www.scipy.org/Cookbook/Matplotlib/Animations

But note that the section "GUI neutral animation in pylab" is no
longer recommended or supported.

The recommended practice can be found in the examples:

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

JDH

···

On Sun, Dec 28, 2008 at 12:39 PM, Leotis buchanan <leotisbuchanan@...287...> wrote:

Hey Guys,

I want to use matplotlib to plot data that is changing every second, I am
thinking that in order to do this i will have to update the data array with
the new data ,
and redraw the graph. Is this the recommended way to do it ?