Connecting Mouse Double Click...

Hello NG,

    I was surfing over the matplotlib classes API, and I didn't find
anything about a way to connect an event like a mouse left double-click. Is
this actually possible? If this is not, is there a way to hack the
button_press_event handler in a way to discard the first click (maybe based
on a time.time() call?) and take only the second click if, say, less than 1
second is gone after the first click?

Thanks in advance for every idea.


"Imagination Is The Only Weapon In The War Against Reality."


Are you using MPL with wxPython? I'd expect so.

In which case, you can use it embedded, and have wx do the event handling. I really think that's the way to go. I'm not sure it's such a good idea for MPL to wrap GUI functionality, let's not try to build a yet another GUI toolkit -- that way lies AnyGUI, and that way lies madness!

Make sure to check out wxmpl and/or Mplot:

By the way, unifying those two packages would be a great wxPython/MPL project, if you're looking for a new one!



Christopher Barker, Ph.D.
NOAA/OR&R/HAZMAT (206) 526-6959 voice
7600 Sand Point Way NE (206) 526-6329 fax
Seattle, WA 98115 (206) 526-6317 main reception