Hi Eric, On Sunday 13 April 2008 7:39:14 pm Eric Firing wrote: > The present NavigationToolbar2 is very nice, but I am thinking about an > improvement: adding a button that would rotate a constraint among three > possibilities, so that pan/zoom and rectangle select could be set to > affect only X, only Y, or be left unconstrained as at present. [...] > Although there might be more elegant ways to do it, I think the simplest > way to get this functionality across backends would be to add a single > button that rotates a variable among values of 'X', 'Y', and 'XY', and > then let that variable constrain the effects of pan/zoom and > rectangle-select.
I would prefer to not add a button to change the behavior of other buttons, but rather stack three buttons (XY,X,Y) for pan and zoom, perhaps selectable from a drop-down widget of some kind, so you can select which version of pan/zoom you want. > It would be nicer, but more work, to have the > variable change the rubberband to a span-select in the latter case; I am > inclined to start with the easiest implementation I can come up with. I > think the simple approach can be done with only a little bit of change > in the backends. That would be nice, maybe for a future addition. > Comments? Objections? > > This could also be done by making a NavigationToolbar3, but I think that > even with inheritance from NavigationToolbar2, this would require more > work. I recently subclassed NavigationToolbar2 to add a crosshairs button. I have multi-dimensional data and I wanted to click on a point in an image to create an associated projection. I had to reimplement several of the toolbar2 methods with minor changes to support an additional button. I wonder if we could come up with a toolbar that was easier to subclass without reimplementing so much of the machinery. I won't have time to pursue this until summer, just throwing it out there. Darren ------------------------------------------------------------------------- This SF.net email is sponsored by the 2008 JavaOne(SM) Conference Don't miss this year's exciting event. There's still time to save $100. Use priority code J8TL2D2. http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone _______________________________________________ Matplotlib-devel mailing list Matplotlib-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-devel