From: Nie, J. <jn...@bn...> - 2010-06-07 16:58:33
|
John, Thank you very much for a prompt reply. I am using Ipython with QT4 backend for the examples. I can have animated plot (dragable vertices) for the path_editor.py, but not for the line_editor.py. My python installation is pythonxy on windows 7. Could you please tell me your installation? Yes, I do mean the matplotlib.widgets.Cursor, and I have version of 0.99.1. My version does not have the two lines as you mentioned. -- Jinsuo -----Original Message----- From: John Hunter [mailto:jd...@gm...] Sent: Monday, June 07, 2010 12:19 PM To: Nie, Jinsuo Cc: mat...@li... Subject: Re: [Matplotlib-users] Animated Line2D On Mon, Jun 7, 2010 at 10:14 AM, Nie, Jinsuo <jn...@bn...> 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? johnh@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 |