|
From: Benjamin R. <ben...@ou...> - 2013-03-15 20:39:36
|
On Fri, Mar 15, 2013 at 12:41 PM, Christian Meesters <mee...@gm...>wrote: > Hi, > > It is quite some time ago since I was intensively using MPL. Perhaps I > will not get the terminology right anymore. And now I hope to get some > pointer for this particular problem: > > I would like to arange some line plots using a grid from left to right in > a single plot / figure instance. Each of these plots is created from > vectors (numpy arrays) of a different length. If I would place subplots of > equal size to place these individual plots from left to right, all will > appear with a different "stretch/squeeze". > > My question now is: Is there a way to place different subplots of > different sizes automatically? For all my plots I will encounter different > number of individual line plots of different size. > > My approach so far (pseudocode): > > from mpl_toolkits.axes_grid1 import Grid > import pylab as plt > > fig = plt.figure(1, (5.5, 3.5)) > grid = Grid(fig, 111, # similar to subplot(111) > nrows_ncols = (1, number_of_subplots), > axes_pad = 0.1, > add_all=True, > label_mode = "L", > ) > > for index in xrange(number_of_subplots): > grid[index].??? > > And now I just do not know how to get any further? How will I get the > necessary extension for each subfigure/plot? Which is the most efficient > way to accomplish all this? Should I import a different class, other than > Grid? > > So, are you wanting them to all have the same x and y coordinates, or maybe you want the aspect ratio to be the same? I am not exactly quite sure what you mean by "extension". Ben Root |