John,

I just tried all backends I have on my Win7 system (Qt4Agg, WXAgg, TkAgg) and 
found none of them could allow the animation in the line_editor.py. Please let 
me know whether I have to use GTK or GTKAgg to get the animation.  Thanks.

--
Jinsuo

-----Original Message-----
From: John Hunter [mailto:jdh2...@gmail.com] 
Sent: Monday, June 07, 2010 12:19 PM
To: Nie, Jinsuo
Cc: matplotlib-users@lists.sourceforge.net
Subject: Re: [Matplotlib-users] Animated Line2D

On Mon, Jun 7, 2010 at 10:14 AM, Nie, Jinsuo <j...@bnl.gov> wrote:
> I modified the path_editor.py example in order to make a line editor, as
> attached.  However, the line is not animated even the line has been
> correctly updated.  It seems canvas.blit is not functioning correctly in
> motion_notify_callback.   Canvas.blit works in draw_callback because the
> initial line can be plotted.

Unfortunately, I cannot understand your problem.  I have tried running
your attached example and it seems to run fine on my system (I can
drag the vertices and the line drawing is updated).  Can you describe
the problem you are seeing?  Could this be a version problem -- what
version of mpl are you running?

  jo...@udesktop191:Downloads> python -c 'import matplotlib; print
matplotlib.__version__'
  1.0.svn


> I read the Curse implement which uses lines.  This implementation uses
> visible but not animated property to achieve the animation.  Any reason for
> that?

Do you mean matplotlib.widgets.Cursor?  It does use the animated
property -- at least in the svn version.  See the line in the __init__
function:

        if useblit:
            lineprops['animated'] = True

JDH

------------------------------------------------------------------------------
ThinkGeek and WIRED's GeekDad team up for the Ultimate 
GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the 
lucky parental unit.  See the prize list and enter to win: 
http://p.sf.net/sfu/thinkgeek-promo
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to