On Thu, Feb 18, 2010 at 11:05 AM, Christopher Barker
<chris.bar...@noaa.gov> wrote:
> John Hunter wrote:

>   fig_subplot( (2,) )
>
> If so, then a tuple has a real advantage. If not, then it doesn't make
> much difference, though I still prefer the tuple, as I can imagine that
> I might define that somewhere else, and it's handy to have it as a
> single object.

fig_subplot( (2,) ) is still more characters than fig_subplot( 2,1),
and more shifted characters which can be harder to type, but since
they are sequential with the function call parentheses in this case it
is probably not a problem.  I'm not convinced by the "single object"
argument.  To do something useful with the axes that are generated,
you probably will need in your code to know how many rows and columns
you have, so at some point you['ll need to define numrows and numcols
as variables anyhow.

Perhaps the following is the best:

  def fig_subplot(numrows=1, numcols=1, ...blah):

Since the most common use case is 1,1 followed by 2,1, one can write

  fig_subplot()   # for 1,1
  fig_subplot(2) # for  2,1
  fig_subplot(numcols=2)  # for 1,2

JDH



But it's not an important difference -- Fernando should just go with
what feels most natural to him

------------------------------------------------------------------------------
Download Intel&#174; 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