|
From: Jae-Joon L. <lee...@gm...> - 2009-08-17 17:46:06
|
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.new_subplotspec(loc=(0,0), colspan=3)) or subplot(gs[0,:]) or subplot(gs[0:3]) # supermongo-like For suplot with a single cell, subplot(gs[0]) # => subplot(331) or subplot(gs[0,0]) 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. Regards, -JJ On Sun, Aug 2, 2009 at 1:00 AM, John Hunter<jd...@gm...> wrote: > On Sat, Aug 1, 2009 at 7:32 PM, Alan G Isaac<ala...@gm...> 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? >> <URL:http://sourceforge.net/mailarchive/message.php?msg_name=6e8d907b0905172009j21b5077fp242c7598ee9fb2c9%40mail.gmail.com> > > 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, > > JDH > > ------------------------------------------------------------------------------ > 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 > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > |