skip mpl-axes-interaction during key_press_event's

Hi everybody,

I use key_press_event's to handle my program.
Therefore I want to skip the matplotlib usage of some keys e.g. 'f', 'g'
and 'l'.

I didn't find the right method to turn the usage off. Can anybody help me?

Could this method be useful for buttons and sliders from widgets.py, too?
Because one don't want to scale or set grid upon these widgets, isn't it?

best regards and thanks in advance for any hints,
Matthias

Hi everybody,

while thinking about the problem of disabling mpl-axes-interaction during
key_press_events two ideas came to my mind:

One could add a <newproperty> (e.g. 'skip_mpl_events') to class Artist or
class Axes(Artist).

a) In the method key_press (of class FigureManagerBase) one could then use
this attribute like:
if event.inaxes.<newproperty> == True:
     return
to skip all built-in events like 'l' (activate log-scale), 'g' (activate
grid), 'f' (toggle fullscreen mode) ... .

b) One could also use this <newproperty> in the axes methods
grid and toggle_log_lineary to skip the events.

Is this a suitable way of disabling the mpl-axes-interaction?

best regards,
Matthias

ยทยทยท

On Friday 27 April 2007 17:42, Matthias Michler wrote:

Hi everybody,

I use key_press_event's to handle my program.
Therefore I want to skip the matplotlib usage of some keys e.g. 'f', 'g'
and 'l'.

I didn't find the right method to turn the usage off. Can anybody help me?

Could this method be useful for buttons and sliders from widgets.py, too?
Because one don't want to scale or set grid upon these widgets, isn't it?

best regards and thanks in advance for any hints,
Matthias