x = arange(0.0, 2.0, 0.01)
y1 = 3 * sin(2 * pi * x)
y2 = sin(2 * pi * x)
figure()
ax1 = subplot(211)
plot(x, y1, 'b')
subplot(212)
plot(x, y2, 'g')
ylim(ax1.get_ylim())
show()
set axis limits in matplotlib pyplot