Using matplotlib and iPython, I have a bunch of plots that I am trying to view (one after the other). Some plots only contain values from 0 to 1 and some contain values in the millions.
After setting the y axis limits using:
ylim((.7,1))
ax = plt.gca() # get the current axes
ax.relim() # make sure all the data fits
ax.autoscale() # auto-scale
# only needed mpl < 1.5
# ax.figure.canvas.draw_idle() # re-draw the figure