There are a few options you can try. And I recommend you to use gridspec module.
http://matplotlib.sourceforge.net/users/gridspec.html
It can also be used with ImageGrid (at least in the master branch, but
not sure for 1.0.1 release).
I'm attaching a sample script.
Regards,
-JJ
On Sat, Aug 6, 2011 at 12:57 AM, astabada <ast...@gm...> wrote:
>
> Hi, I am using add_subplot(...) to create a row of 4 plots, and have a tricky
> question.
> I have an image (a figure instance) composed of 4 subplots in a single row.
> I'd like to know how to arrange a number of these rows in a bigger grid,
> namely a grid of 10x3 plots, each plot made up of 1x4 subplots. The ideal
> solution would be:
> * function that returns 1x4 plots
> * call that function repeatedly
> I tried to do this with
> def function(figure, which_one, index):
> grid = ImageGrid(figure, 10,3,index, nrows_ncols = (1, 4))
> grid[0].imshow(something(which_one))
> grid[1].imshow(.....)
> ...
>
> however the plots apparently share the y axis, which for me is unfeasable
> as:
> 1) the first of 4 images has about 10000 pixels, while the others have 24
> (6x4 pixels): no chance they can be on the same scale!
> 2) I want to plot a colorbar on top of the 6x4 subplots.
> 3) I want to write labels on top of the 6x4 subplots.
>
> This is what grid produces: an ugly white space if y axes don't have the
> same length.
> http://old.nabble.com/file/p32203453/grid.png
>
> This is my best attempt, still a lot of work to do, but don't know how to
> tile several of these in a 10x3 array.
> http://old.nabble.com/file/p32203453/ifu1_1plot.png
>
> Thank you very much.
>
> Desperately,
> astabada
> --
> View this message in context: http://old.nabble.com/Subplot-of-subplots.-tp32203453p32203453.html
> Sent from the matplotlib - users mailing list archive at Nabble.com.
>
>
> ------------------------------------------------------------------------------
> uberSVN's rich system and user administration capabilities and model
> configuration take the hassle out of deploying and managing Subversion and
> the tools developers use with it. Learn more about uberSVN and get a free
> download at: http://p.sf.net/sfu/wandisco-dev2dev
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
|