Hello -

I have a hard time getting aspect_ratio to work correctly with sharex.
This used to work quite a while ago, and has been broken for a long time (or
at least I don't know how to get it to work)
But I finally found the time to put a simple example together to determine
if I do something wrong, or whether this can be fixed easily.

When I make a small contour plot setting the aspect ratio equal works fine:

from pylab import *

x,y = meshgrid(linspace(0,5,5),linspace(0,5,5))

figure()
ax = subplot(211)
ax.contour(x,y,x)
ax.set_aspect('equal',adjustable='datalim')
draw()

Note that the datalim on the x-axis is expanded, as the data limit on the
y-axis is the determining factor.

If I now try to do the same thing while linking the x-axis of a second
subplot to the first one, then
the same call to set_aspect changes the data limit on the y-axis while
keeping the x-axis fixed.
That seems inconsistent and is not the behavior I want:

figure()
ax = subplot(211)
ax.contour(x,y,x)
ax2 = subplot(212,sharex=ax)
ax.set_aspect('equal',adjustable='datalim')
draw()

Any idea what I am doing wrong?

Thanks, Mark
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to