From: John H. <jd...@gm...> - 2010-02-18 13:02:54
|
On Wed, Feb 17, 2010 at 10:50 PM, Fernando Perez <fpe...@gm...> wrote: >> This is a worthy goal. One use case I would like to see supported >> is the sharex/sharey args:: > Sheesh, some people really want everything :) Yes, you should know better by now than to propose a minor enhancement.... Another thought about the interface. How about *just* returning the figure instance, and let the users simply index into the axes list. Then they can have their 0 based indexing because it is a python list:: fig = fig_subplot((2,1), sharex=1) fig.axes[0].plot(...) fig.axes[1].scatter(...) mpl is creating this axes list anyway.... I'm also fine with your implementation -- just a suggestion. One other thing: I don't think a tuple is best for the axes dimensionality. We always require two and exactly two shape arguments (numrows, numcols) so we don't need the flexibility of the tuple in the way that numpy.zeros does. And it is easier to type:: fig_subplot(2, 1, sharex=1) than:: fig_subplot((2,1), sharex=1) As the world master of keystroke efficiency, I would think you would appreciate the savings! But again, if you prefer the tuple, I don't have a problem with it. It does have the advantage of visually suggesting a single shape argument. JDH |