On Fri, May 29, 2009 at 01:50, Darren Dale <dsdale24@...> wrote:
> On Thu, May 28, 2009 at 6:01 PM, Sandro Tosi <morph@...> wrote:
>> Hi Darren,
>> On Thu, May 28, 2009 at 19:16, Darren Dale <dsdale24@...> wrote:
>> > Try the attached script.
>> Oh it works very great! thanks you very much!
>> One thing I've done is also remove
>> import matplotlib
>> 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
>> # just draw the animated artist
>> # just redraw the axes rectangle
>> 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?
> Not off the top of my head. Maybe someone else on the list can offer a
Thanks a lot for your help! Early morning coding did help! :)
I'm attaching a script to do what I wanted to. The solution was to
remove the animated=True when calling self.ax.plot and then call an
explicit self.fig.canvas.draw() - and here it is an animate sin and
cos function! :)
Sandro Tosi (aka morph, morpheus, matrixhasu)
My website: http://matrixhasu.altervista.org/
Me at Debian: http://wiki.debian.org/SandroTosi