I have a little problem on understanding how to move an annotation on a plot.
My idea is to make a plot where some informations follow the cursor when moving on the data, like you can see in plots from piwik ( http://piwik.org/demo )
In the script in attachment, I can follow the cursor coordinate, change the text of the annotation, but I cannot move it.
I think the current method names of Annotation class (originally from
the Text class) is a bit confusing.
And this needs to be fixed.
Anyhow, instead of calling set_position method, you need to set the
"xytext" attribute directly.
this_annotation.xytext = (event.x, event.y)
Regards,
-JJ
···
On Wed, Jan 6, 2010 at 9:49 AM, <charles.roduit@...287...> wrote:
Dear all,
I have a little problem on understanding how to move an annotation on a
plot.
My idea is to make a plot where some informations follow the cursor when
moving on the data, like you can see in plots from piwik ( http://piwik.org/demo )
In the script in attachment, I can follow the cursor coordinate, change the
text of the annotation, but I cannot move it.
------------------------------------------------------------------------------
This SF.Net email is sponsored by the Verizon Developer Community
Take advantage of Verizon's best-in-class app development support
A streamlined, 14 day to market process makes app distribution fast and easy
Join now and get one step closer to millions of Verizon customers http://p.sf.net/sfu/verizon-dev2dev
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net matplotlib-users List Signup and Options