From: Marco Fumana <fumana@la...> - 2007-02-07 14:44:11
I'm using matplotlib 0.85 in FigureCanvasGTKAgg backend.
I'm usign mpl_connect method to connect mouse event to function, but
I'm not able to capture mouse wheel motion.
Could somebody help me?
From: John Hunter <jdh2358@gm...> - 2007-02-07 15:10:33
On 2/7/07, Marco Fumana <fumana@...> wrote:
> I'm using matplotlib 0.85 in FigureCanvasGTKAgg backend.
> I'm usign mpl_connect method to connect mouse event to function, but
> I'm not able to capture mouse wheel motion.
> Could somebody help me?lotlib-users
Hmm, this surprised me but I just confirmed it. In older versions of
gtk, if I recall correctly and maybe Steve can confirm, you could get
scroll events as buttons 4 and 5 on button_press_event, but it looks
like you now have to explicitly connect to scroll_event apparently.
mpl should encapsulate the scroll_event across backends, me thinks.
For now you should be able to do
but these will be GTK events and callbacks so they will have a
different signature than the mpl callback and will not have the mpl
metadata like xdata and ydata.