From: Sandro T. <mo...@de...> - 2009-05-28 22:01:40
|
Hi Darren, On Thu, May 28, 2009 at 19:16, Darren Dale <dsd...@gm...> wrote: > Try the attached script. Oh it works very great! thanks you very much! One thing I've done is also remove import matplotlib matplotlib.use('Qt4Agg') since we're already importing the qt4agg backend directly right after. One only thing it's left a bit obscure (also because doc is a little missing) is this piece of code: # update the data self.line.set_ydata(np.sin(self.x+self.cnt/10.0)) # just draw the animated artist self.ax.draw_artist(self.line) # just redraw the axes rectangle self.blit(self.ax.bbox) first, I've not clear wat draw_artist and blit does, so if you can shine some light on me :) Secondly, the "effect" I'd like to achieve is to update the current line values and "replace" the current line with a new one. In this code, instead, the line is plotted keeping the previous instances around. So the effect is to fil the canvas with sin function plots instead of updating only one instance. Do you know how to "fix" this? Thanks a lot for your support! :) -- Sandro Tosi (aka morph, morpheus, matrixhasu) My website: http://matrixhasu.altervista.org/ Me at Debian: http://wiki.debian.org/SandroTosi |