On Wed, Feb 17, 2010 at 8:29 PM, Fernando Perez <fperez....@gmail.com> wrote:
> On Wed, Feb 17, 2010 at 7:27 PM, David Warde-Farley <d...@cs.toronto.edu> 
> wrote:
>>
>> An effusive "yes, yes, good god yes!" from this mpl-devel lurker.
>
> Thanks, that's two good pluses.
>
> Any suggestions on name changes, or other fixes to make?  Otherwise,
> once I find a free minute I'll put it in.

I think the name "figsubplots" or "fig_subplots" is better because you
are creating Subplot instances.  Alternatively, you might want to
consider simply "subplots" which returns just the list of subplots:
the figure can always be accessed as an attribute of the Subplot
instance::

  ax1, ax2, ax2, ax4 = subplots(2,2)
  fig = ax1.figure

Not sure that this is better; just a thought.


> Should it go into pyplot directly, or elsewhere and imported from
> pyplot to expose it at the top-level?  (I'm not overly familiar with
> the layout of the whole library).

pyplots is the right place for it since it is implicitly creating a
current figure and the only place where that magic happens is in
pyplot.

> I'm also trying to show my students how *they* can improve their
> tools; e.g. earlier this week a homework problem I wrote up led me to
> a useful sympy patch that was quickly upstreamed:

This is a worthy goal.    One use case I would like to see supported
is the sharex/sharey args::

  ax1 = fig.add_subplot(211)
  ax2 = fig.add_subplot(212, sharex=ax1)

If there is not an easy way to specify the shared axes with "figaxes"
or whatever it is called, I would not use it too often, because my
common case is multiple rows of subplots with a common x-axis.

One thing that will be nicer with the suggested patch is it makes it
easier to change a script where the subplot layout goes from 211 to
311 to 411 (this happens to me all the time as I find I want to plot
more stuff for a give time series).  I have to change all the 311,
312, 313 to 411, 412, 413, and with your patch it would be a simple
change in one line from::

  ax1, ax2, ax3 = subplots(3,1)

to::

  ax1, ax2, ax3, ax4 = subplots(4,1)

Perhaps the solution to my sharex conundrum is to support an axes number, eg

  ax1, ax2, ax3, ax4 = subplots(4,1, sharex=1)

so all the subplots would have sharex with ax1.

JDH


JDH

------------------------------------------------------------------------------
Download Intel&reg; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs 
proactively, and fine-tune applications for parallel performance. 
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel

Reply via email to