When I run this code
from pylab import *
figure()
ax1 = subplot(121)
plot([1, 2, 3], [1, 2, 3])
subplot(122, sharex=ax1, sharey=ax1)
plot([1, 2, 3], [1, 2,
Give this a try:
from pylab import *
figure()
ax1 = subplot(121, autoscale_on=False, aspect='equal', xlim=[1,3], ylim=[1,3])
plot([1, 2, 3], [1, 2, 3])
##axes().set_aspect('equal')
ax2 = subplot(122, autoscale_on=False, aspect='equal', xlim=[1,3], ylim=[1,3])
plot([1, 2, 3], [1, 2, 3])
draw()
show()
I commented out the axes() line as that would create a new axes at an arbitrary location, rather than a pre-fabricated subplot with a calculated position.
Calling subplot actually creates an Axes instance, which means it can use the same properties as that of an Axes.
I hope this helps :)