Settling y-axis scaling

That's fine. I'll start using

    > ax.viewLim.intervaly().get_bounds() # the y limits

    > to get the y limits.

Hi Vineet,

This is not recommended. I pointed you to limit attributes these so
you can compare what is happening with the data and view limits
separately, and to give you some insight into how to poke around if
you need to. There is no reason for you to call
ax.viewLim.intervaly().get_bounds() since this is what get_ylim calls
anyway. The set_ylim and get_ylim functions are fixed as part of the
matlab API; The viewLim and dataLim attributes are not. When
possible, stick with the documented API, so your code will be
compatible with future matplotlib releases.

    > In any case though, the order in which the plot functions
    > are called should not change the value returned by
    > self.axMiddle.get_ylim. I think that is a bug.

There may be a bug, but let's be clear to find out. Here is what is

Every time you issue a plot command, the ax.dataLim are updated.
These should exactly bound the min and max of the x and y range of
your data. After that, ax.autoscale_view is called. This updates the
min and max of the x and y *view* limits, which should include, but
may exceed, the datalim. Exactly how this view limit update is done
depends on the tick locator you have chosen. The default locator is
matplotlib.ticker.AutoLocator, but you can customize this.

if you issue repeated plot commands

    print 'datalim', ax.dataLim.intervaly().get_bounds()
    print 'viewlim', ax.get_ylim()

neither the viewlim nor the datalim after all plot commands have been
issued should not be affected by the order of the plot commands. Of
course, you need to apply the patch I posted in my previous email (to
the has_data function) because there was a bug.

The viewlim *will* be changed after each plot command, and will depend
on the order, as in

    print 'viewlim', ax.get_ylim()
    print 'viewlim', ax.get_ylim()
    print 'viewlim', ax.get_ylim()

but again, the final viewlim should be order independent. Is this
what you observe?

If the plot order does affect the final limits, let me know. If the
viewlim differs from the data lim, that is unsurprising, as that is by
design. If you are unhappy with the way to the autolocator is
choosing the view limits, you have a couple of choices: 1) let me know
by giving me the requisite datalim and viewlim boundaries, what is
happening, and what you think should be happening and I'll look in to
fixing it or 2) use a custom locator that autoscales the view limits
in the way you want.