## matplotlib-users

 [Matplotlib-users] Setting Relative Heights For Figure Rows From: Chris Spencer - 2010-01-11 14:54:17 ```I wanted to display my figure legend below my figure in the second row, so I used subplot(211) to create two rows. However, this creates two rows of equal height, so my graph is crammed into half the figure height in the first row, while my tiny legend barely fills up any of the second row. How do you specify relative heights of each row? For example, I'd like to specify the first row takes 80% of the figure height, while the second takes 20%. I've searched the docs, but I can't find anything. Is this possible? Regards, Chris ```
 Re: [Matplotlib-users] Setting Relative Heights For Figure Rows From: Matthias Michler - 2010-01-11 15:19:09 ```Hi Chris, I think pyplot.axes does what you are after, e.g. ax1 = axes([0.1, 0.3, 0.8, 0.6]) ax2 = axes([0.1, 0.1, 0.8, 0.1]) Kind regards, Matthias from the docs of pyplot.axes: `axes(rect, axisbg='w')`` where *rect* = [left, bottom, width, height] in normalized (0, 1) units. *axisbg* is the background color for the axis, default white. On Monday 11 January 2010 15:54:10 Chris Spencer wrote: > I wanted to display my figure legend below my figure in the second > row, so I used subplot(211) to create two rows. > > However, this creates two rows of equal height, so my graph is crammed > into half the figure height in the first row, while my tiny legend > barely fills up any of the second row. How do you specify relative > heights of each row? For example, I'd like to specify the first row > takes 80% of the figure height, while the second takes 20%. I've > searched the docs, but I can't find anything. Is this possible? > > Regards, > Chris > > --------------------------------------------------------------------------- >--- This SF.Net email is sponsored by the Verizon Developer Community > Take advantage of Verizon's best-in-class app development support > A streamlined, 14 day to market process makes app distribution fast and > easy Join now and get one step closer to millions of Verizon customers > http://p.sf.net/sfu/verizon-dev2dev > _______________________________________________ > Matplotlib-users mailing list > Matplotlib-users@... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users ```
 Re: [Matplotlib-users] Setting Relative Heights For Figure Rows From: Jae-Joon Lee - 2010-01-11 18:38:01 ```See this example http://matplotlib.sourceforge.net/examples/pylab_examples/scatter_hist.html Or, you're willing to learn something new, you may use axes_grid toolkit. http://matplotlib.sourceforge.net/examples/axes_grid/scatter_hist.html -JJ ```