John,

Thanks for the information. The solution worked so, I can now do a mouse
over over lines from either axes and have a nice little tooltip, etc.  I
found that if I change the zorder of the axis right after attempting to
"pick" on the mouse event, it fails, but it's fine for my needs to just
toggle the "top" axes on mouse events when looking for a mouse hover. 

                    if self.ax.get_zorder() == 0.1:
                        ax.set_zorder( 0 )
                        ax2.set_zorder( 0.1 )
                    else:
                        ax2.set_zorder( 0 )
                        ax.set_zorder( 0.1 )

                self.figure.pick( event )

This is perhaps a bit of hackery, but I've not seen any mouse over legends
of the sorts built in.  

Thanks again,
-Erik


John Hunter-4 wrote:
> 
> 
> I'm not sure why it worked before -- that surprises me.  Only one axes
> can receive the pick event currently, so if you have overlapping axes,
> as you do with twinx, the one with the highest zorder will receive the
> pick events.  
> 
> 

-- 
View this message in context: 
http://www.nabble.com/onpick-on-a-2-y-plot-%28-via-twinx%28%29-%29-seems-to-only-allow-picking-of-second-axes%27s-artists-tp25049128p25062402.html
Sent from the matplotlib - users mailing list archive at Nabble.com.


------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to