Hello.
Concretly, I have one figure with some plots. I only want to have the
coordinates of the mouse when it is clicked over this figure.
On the other hand, when I click on the button, I have the button event, but
also the mouse one.
Maybe, one solution would be to know that the button has been
I am sorry, I am not sure that I understand what you are trying to do. Why
do you want the same action to happen whenever you click the mouse button
(anywhere in the figure), and whenever you click the mouse button (when you
are over the button)? The two areas overlap, so it would always trigger th
Does this example help?
http://matplotlib.org/examples/widgets/buttons.html
With the Button widget, you won't need to do any mpl_connect calls, the
widget takes care of that for you. Also, as a side note, the
"button_press_event" does not refer to the button widgets, it refers to the
mouse button.