On Wed, Feb 17, 2010 at 8:08 AM, Matthias Michler
<matthiasmich...@gmx.net> wrote:
> Hi list, Hi Gökhan,
>
> I once more would like to say that I like the 2 new features introduced by
> Gökhan (key 'k' for xscaling and the generalized handling of the key-mapping,
> which allows the user to choose its prefered key for a certain task) and I'd
> like to see this in matplotlib.
>
> I attached a patch (against todays svn) of my final version, which is a
> slightly modified version of Gökhans patch.
>
> If anybody could test it and comments on this I'd be happy. Otherwise I will
> place the patch on the patch tracker in (let's say) a week.
>
> Thanks in advance for any help in order to bring this into matplotlib.

Hi -- these look like useful changes.  In most of matplotlib rc we
have a namespace for the rc keys, so I prefer something like

  keymap.fullscreen : f               # toggling
  keymap.home : h, r, home            # home or reset mnemonic

Also, could you include in your patch a diff against

  mpl/doc/users/navigation_toolbar.rst

documenting the changes.

Also, I'm not sure you need

+        # to get a common standard we move all keys for each action into a list
+        for key in [fullscreen_keys, home_keys, back_keys, forward_keys,
+                    pan_keys, zoom_keys, save_keys, grid_keys,
+                    toggle_xscale_keys, toggle_yscale_keys, all]:
+            if type(key) is not list:
+                key = list(key)
+

If you setup your validate func properly in rcsetup, you can guarantee
that each of these keymap.* entries will be a list of strings, even
those changes interactively from the prompt.  So I suggest changing
each of these key entries to have a validate_stringlist validator and
then you won't need this check.

Thanks,
JDH

------------------------------------------------------------------------------
SOLARIS 10 is the OS for Data Centers - provides features such as DTrace,
Predictive Self Healing and Award Winning ZFS. Get Solaris 10 NOW
http://p.sf.net/sfu/solaris-dev2dev
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to