Hello guillaume, On Mon, Jun 29, 2009 at 10:53, guillaume ranquet<granq...@wyplay.com> wrote: > I've been asked to transform my app to something more "dynamic" > it currently reads an xml file, it has now to read a stream of xml from > a socket (I can handle this part :D) and plot each point as they are > coming from the network. > > I'll end up having tons of points over multiple axes; I guess doing > sonething like fig.plot(concat(old-data,new-point)) would be rather > inefficient and I wonder if someone ever made something like this using > matplotlib?
You can refer to animation examples [1] for code that does what you want. [1] http://matplotlib.sourceforge.net/examples/animation/index.html at the very end, you update the line data with set_ydata() , set_xdata() or set_data() and then call a draw() on the figure. Regards, -- Sandro Tosi (aka morph, morpheus, matrixhasu) My website: http://matrixhasu.altervista.org/ Me at Debian: http://wiki.debian.org/SandroTosi ------------------------------------------------------------------------------ _______________________________________________ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users