[Matplotlib-users] pick events don't work with twiny
joferkington at gmail.com
Wed Jan 31 08:43:29 EST 2018
If you know the artists you'd like to fire pick events for, you can work
around it in a few different ways. One option is to bind to mouse events
and handle firing off pick events in that callback.
Here's how mpldatacursor gets around the twinx/twiny issue:
On Wed, Jan 31, 2018 at 1:31 AM, V. Armando Solé <sole at esrf.fr> wrote:
> On 30/01/2018 17:27, Benjamin Root wrote:
> > I seem to recall someone once messing around with the zorder of the
> > axes object, but I forget if that actually worked. Of course the other
> > workaround is to make the axes with the pickable objects be the twined
> > axes.
> I'm using something on those lines since some time that works for me
> since quite some time. Here is a code fragment:
> self.ax = self.fig.add_axes([.15, .15, .75, .75],
> self.ax2 = self.ax.twinx()
> # critical for picking!!!!
> Best regards,
> Matplotlib-users mailing list
> Matplotlib-users at python.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Matplotlib-users