 # axes placement depends on figsize?

Can someone explain to me how/why the figure normalized [0,1] coordinates
depends on the figsize property? At least this is what it looks like to me.
This affects axes placement and so far I haven't been able to do what I
want.

I want to have square plots placed without spacing between them and with a
little margin on the left and top. So I tried:

s=0.4
axes([0.01, 0.99-s, s, s],aspect='equal')
axes([0.01+s, 0.99-s, s, s],aspect='equal')
axes([0.01, 0.99-2*s, s, s],aspect='equal')
axes([0.01+s, 0.99-2*s, s, s],aspect='equal')

The vertical positioning works as I expected but the x positioning does not
work. The axes have spacing between them - which means that 0.1 represents a
different size in x or in y - and I just can't understand that behavior.

figure(figsize=(5,5))
it works

But this is not the solution I need because the real plot I'm trying to do
is a 6x5 (6 axes per 5 axes, subplots if you mean) plot with horizontal
spacing only between the 3rd and 4th axes. There is no way I could now the
correct aspect ratio that I should set figsize to, to get it right.

How could I manage this?

Thank you

Ramiro

···

View this message in context: http://www.nabble.com/axes-placement-depends-on-figsize--tp21082730p21082730.html
Sent from the matplotlib - users mailing list archive at Nabble.com.

ramirodsl wrote:

Can someone explain to me how/why the figure normalized [0,1] coordinates
depends on the figsize property? At least this is what it looks like to me.
This affects axes placement and so far I haven't been able to do what I
want.

I want to have square plots placed without spacing between them and with a
little margin on the left and top. So I tried:

s=0.4
axes([0.01, 0.99-s, s, s],aspect='equal')
axes([0.01+s, 0.99-s, s, s],aspect='equal')
axes([0.01, 0.99-2*s, s, s],aspect='equal')
axes([0.01+s, 0.99-2*s, s, s],aspect='equal')

The vertical positioning works as I expected but the x positioning does not
work. The axes have spacing between them - which means that 0.1 represents a
different size in x or in y - and I just can't understand that behavior.

The problem is that you are giving conflicting instructions. Your axes command is initially saying to make the boxes with the given proportions of the figure, regardless of the dimensions or aspect ratio of that figure; but setting the aspect is overriding that by requiring the boxes to be square. You can still get the behavior you want, however, by adding an anchor kwarg to each axes call. To make sure the
boxes cluster together, add anchor='SE' to the upper left axes, anchor='SW' to the upper right, and 'NE' and 'NW' to the lower left and right, respectively.

Eric

···