From: Eric F. <ef...@ha...> - 2007-03-21 21:36:30
|
John Hunter wrote: > On 3/21/07, Michael Lerner <mgl...@gm...> wrote: >> Hi, >> >> I want to make a figure that has three subplots. The top one should >> be a big, mostly square thing. The bottom two should be rectangular >> things. That is, I want it to look like this: >> >> XXXXX >> XXXXX >> XXXXX >> XXXXX >> >> XXXXX >> XXXXX >> >> XXXXX >> XXXXX >> >> so, I'm using subplot(311), subplot(312), subplot(313). But, things >> are getting resized so that each of the rows has the same height. >> That really messes up the aspect ratio for my top row. > > The following might hrlp: > > ax1 = subplot(211) > ax2 = subplot(413) > ax3 = subplot(414) > > JDH And if you want to tweak the positions you can use, e.g., oldpos = ax1.get_position() to find out the present position, and ax1.set_position(newpos) to change it. The position rectangles are [left, bottom, width, height] in relative coordinates--that is, fractions of the figure width and height. If you want to control the aspect ratio of the data without changing the position rectangle (e.g. after adjusting it as above), use ax1.set_aspect(aspect, adjustable='datalim'). Eric |