Hi,

Back with same problem when embedding in gtk.

I would like to enable the key pressed event (key '1'  '2'  'a'  'g' .. )
of NavigationToolbar2 in my pyGTK app.
(These keys shortcut are described here: (or see  PS of this email)
http://sourceforge.net/tracker/index.php?func=detail&aid=1432252&group_id=80706&atid=560722
)
The shorcuts work perfectly using pylab. But when I include matplotlib
in my pyGTK app the shorcuts are broken.  Example of the two version
(pylab: two_scales.py and pygtk: two_scales_embedded_in_gtk2 ) are
attached to this email.
How could I manage to make them work ?

Thanks for your help.

David

PS
"""
NavigationToolbar2 now manages overlapping axes correctly
when the axes overlap like in two_scales.py,
NavigationToolbar2 only managed one axe.
For example, when zooming or panning, only the left y
scale will move.
With the patch, both axes will move.

It is also possible to select only one axe by
pressing a digit.
pressing '1' will enable navigation (set_navigate())
only on the first axe under the cursor.
pressing '2' will enable navigation only on the
second axe under the cursor.

Also, the LocationEvent.inaxes will behave
accordingly. For example, pressing 'g' will enable
the grid on the selected axe.

pressing 'a' will reenable all axes under the cursor.
"""

Attachment: two_scales.py
Description: Binary data

Attachment: two_scales_embedded_in_gtk2.py
Description: Binary data

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to