[Matplotlib-users] mouse cursor coordinates
tcaswell at gmail.com
Fri Jun 3 08:30:56 EDT 2016
See the spline example in this gist
The trick is to register an instance method into the callbacks so that you
can keep state between calls.
On Fri, Jun 3, 2016 at 6:12 AM grivet <grivet at cnrs-orleans.fr> wrote:
> I would like to go further and, in fact, do the following:
> repeat n times
> click inside a figure
> retrieve and store the pointer coordinates
> show a mark (or circle or whatever) at this point
> Thank you for your suggestions
> JP Grivet
> > Right again! A separate window is now created and I can click inside
> > and retrieve the pointer coordinates.
> > Thanks a lot,
> > JP Grivet
> >> Ok, I do not use spyder so I may be wrong, but it looks that it works if
> >> in the preferences windows (Tools -> Preferences)
> >> in the option:
> >> "IPython console"
> >> In the tab:
> >> "Graphics"
> >> you select the Backend:
> >> "Automatic"
> >> You probably have to restart spyder for it to work.
> >> Regards,
> >> Juan
> Matplotlib-users mailing list
> Matplotlib-users at python.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Matplotlib-users