|
From: Paul H. <pmh...@gm...> - 2012-09-19 01:56:25
|
On Tue, Sep 18, 2012 at 3:14 PM, Sean Lake <ody...@gm...> wrote: > Hello all, > > I want to adjust the wspace used in a gridspec plot on a cell by cell basis. Anyone have suggestions for how to do that? I haven't been able to find an api to do that directly. The other possibility would be to be able to embed a gridspec within a gridspec, but I'm not sure if that's possible, either. > > More details: I have a plot that has two subplots arranged in a single row or column. Both plots share their relevant border axis, so I don't want space between them. They also share a color bar, however, and the only way I've been able to get that to draw in a sane way was to give it it's own axes instance in a separate cell of the gridspec. I therefore want to remove the space between the main plots without removing it for the color bar. This worked fine for the wider than tall plots since I could stack them and set hspace to 0 and have the color bar extend across rows. For the pair of plots that are more square, and therefor best put side by side, I'm having trouble finding a solution. > > Thanks, > Sean Sean, I *think* the best way to do this is use multiple GridSpec objects within a single figure. Does this example help? http://matplotlib.org/users/gridspec.html#adjust-gridspec-layout -paul |