John, you added this logic with comment, "added support
> for multiple overlapping axes with pan/zoom". I think
This was a user contributed patch, but I did check it in.
> for a user to address this problem correctly they should
> use the zorder property. I added a check a while back
> that sets the inaxes property of a LocationEvent to the
> highest zorder if multiple axes are found.
It's a little more than zorder, though, since in the case of
examples/two_scales.py you have to axes that entirely overlap one
another, and you may want both to respond to navigation. In general I
like the idea of using zorder to determine which axes responds to
navigation commands, but do you think it can handle this case as well.
> Fixed in svn.
Thanks for looking into this one.
JDH
It's a little more than zorder, though, since in the case of
examples/two_scales.py you have to axes that entirely overlap one
another, and you may want both to respond to navigation. In general I
like the idea of using zorder to determine which axes responds to
navigation commands, but do you think it can handle this case as well.
In this case I think the correct approach would be to set the zorder
higher on one axes, and in that axes' callback programmatically invoke
the same event for the other axes. I will look at the example and
implement/comment this approach.
- Charlie
I wasn't aware of the pylab twinx function which is what broke. The
nav-toolbar events still work for me. The subplots adjust
functionality broke though. I fixed this by accounting for the case
that _sharex or _sharey is an instance of Subplot. I didn't modify
two_scales.py at all and everything seems to be working correctly.
In the case you want custom key or mouse event interaction in
two_scales, one might have to do the zorder trick I mentioned before.
Committed.
The broken subplots toolbar might justify a minor release here soon,
unless you think it can wait until 88. Since no one has complained
(except me), it might be able to wait.
- Charlie
···
On 4/3/06, Charlie Moad <cwmoad@...149...> wrote:
> It's a little more than zorder, though, since in the case of
> examples/two_scales.py you have to axes that entirely overlap one
> another, and you may want both to respond to navigation. In general I
> like the idea of using zorder to determine which axes responds to
> navigation commands, but do you think it can handle this case as well.