|
From: Christian M. <mee...@gm...> - 2013-03-15 16:41:59
|
<html><head></head><body><div style="font-family: Verdana;font-size: 12.0px;"><div>Hi,<br/></div><div><br/></div><div>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:<br/></div><div><br/></div><div>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".<br/></div><div><br/></div><div>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.<br/></div><div><br/></div><div>My approach so far (pseudocode):<br/></div><div><br/></div><div>from mpl_toolkits.axes_grid1 import Grid<br/>import pylab as plt<br/></div><div><br/></div><div>fig = plt.figure(1, (5.5, 3.5))<br/>grid = Grid(fig, 111, # similar to subplot(111)<br/> nrows_ncols = (1, number_of_subplots),<br/> axes_pad = 0.1,<br/> add_all=True,<br/> label_mode = "L",<br/> )<br/></div><div><br/></div><div>for index in xrange(number_of_subplots):<br/></div><div> grid[index].???<br/></div><div><br/></div><div>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?<br/></div><div><br/></div><div>TIA<br/></div><div>Regards,<br/></div><div>Christian<br/></div><div><br/></div><div><br/></div></div></body></html> |