On Sat, Oct 29, 2011 at 2:52 PM, Antoine Levitt <antoine.lev...@gmail.com> wrote: > Just typing f = gcf() displays a figure, which I don't want to do. I > want to be able to put something in my ipython init file that'd set my > bindings, without changing anything else.
This is a reasonable request, though there are some implementation details to sort through. For one, the rc file format is very simple, and not amenable to putting in multil-ine functions. But you could write something like keybinding.q : lambda event: plt.close(event.canvas.figure) Eg, when a key is pressed for which you have associated a lambda, we could call your lambda with the event that triggered, and you can access attributes like canvas.figure to operate on them. We could eval your lambda in the pyplot namespace. But more sophisticated functions would be difficult to expose given the simplicity of rc format. If you are interested in taking a crack at this Antoine, we'd be happy to evaluate a pull request. If not, perhaps I or one of the other developers can take a look. Note that in most windowing systems, it is fairly easy to bind a keystroke to close a window, so you could get the effect of 'q' w/o modifying MPL, though you might need a two keystroke binding, ------------------------------------------------------------------------------ Get your Android app more play: Bring it to the BlackBerry PlayBook in minutes. BlackBerry App World™ now supports Android™ Apps for the BlackBerry® PlayBook™. Discover just how easy and simple it is! http://p.sf.net/sfu/android-dev2dev _______________________________________________ Matplotlib-devel mailing list Matplotlib-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-devel