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.

Andrea.

"Imagination Is The Only Weapon In The War Against Reality."
http://xoomer.virgilio.it/infinity77

Andrea,

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:

http://agni.phys.iit.edu/~kmcivor/wxmpl/
http://cars9.uchicago.edu/~newville/Python/MPlot/

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

-Chris

···

--
Christopher Barker, Ph.D.
Oceanographer
                                         
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

Chris.Barker@...259...