Howdy,

in trying to teach a more structured use of mpl, I keep getting
annoyed by the whole figure(), add_subplot(), grab axes dance.  I've
also seen students get confused by it.  Does something along these
lines sound useful to have in the core (see attached)?

In use, below.  You'd normally capture f, a = figaxes(...) to get the
figure and axes list, but I leave it off here for display purposes:

In [37]: figaxes()
Out[37]:
(<matplotlib.figure.Figure object at 0xa24b4cc>,
 [<matplotlib.axes.AxesSubplot object at 0x9e74a4c>])

In [38]: figaxes((2,1))
Out[38]:
(<matplotlib.figure.Figure object at 0xa359fcc>,
 [<matplotlib.axes.AxesSubplot object at 0xa47c66c>,
  <matplotlib.axes.AxesSubplot object at 0xa4a5c8c>])

In [39]: figaxes((2,2),dict(polar=True))
Out[39]:
(<matplotlib.figure.Figure object at 0xa6e340c>,
 [<matplotlib.axes.PolarAxesSubplot object at 0xa6fd5ac>,
  <matplotlib.axes.PolarAxesSubplot object at 0xa8b73cc>,
  <matplotlib.axes.PolarAxesSubplot object at 0xa8dd54c>,
  <matplotlib.axes.PolarAxesSubplot object at 0xa9686cc>])


Feedback welcome.

Cheers,

f

Attachment: fax.py
Description: Binary data

------------------------------------------------------------------------------
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