I took a stab at this during the weekends and a patch is attached.
1) introduces a new command subplot2grid. e.g.,
subplot2grid(shape=(3,3), loc=(0,0), colspan=3)
it still creates a Subplot instance.
2) subplot command can take a SubplotSpec instance which is created
using the GridSpec.
gs = GridSpec(3,3) # shape=3,3
subplot(gs[0:3]) # supermongo-like
For suplot with a single cell,
subplot(gs) # => subplot(331)
3) Each GridSpec can have associated subplot parameters (subplot
params of the figure is used if not set).
Also see the example (demo_gridspec.py).
We may further try to improve it (during the sprint maybe) if others
are happy with the patch.
gridspec.patch (13 KB)
On Sun, Aug 2, 2009 at 1:00 AM, John Hunter<jdh2358@...287...> wrote:
On Sat, Aug 1, 2009 at 7:32 PM, Alan G Isaac<alan.isaac@...287...> wrote:
On 8/1/2009 4:07 PM Thomas Robitaille apparently wrote:
Since matplotlib is about to hit 0.99,
Which reminds me, was there a decision on subplot2grid etc?
There are lots of good suggestions in that thread -- on this issue,
all the best people will be at scipy and/or participating in the
sprint (Andrew who wrote the mpl sizer toolkit, JJ who does more
strange and wonderful things than anyone, Ryan May who has thought
through the issues and has done a lot of great work). So we'll
definitely bring it up and see if we can do something about it. There
are two pieces to this thread: the non-pythonic 1 based addressing of
the current subplot command ("don't blame me, talk to the mathworks"),
and the ability to easily specify column or row spans across the grid.
The former is a minor wart that is unlikely to change, the latter is
a significant feature that we should definitely support. Maybe you can
join us via skype if not in person in Pasadena, and we can try an
improve the current implementation. I don't imagine adding support
for spans would be too hard,
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now. http://p.sf.net/sfu/bobj-july
Matplotlib-users mailing list