[Matplotlib-users] pick events don't work with twiny
ben.v.root at gmail.com
Tue Jan 30 10:55:40 EST 2018
The problem is that the second axes is getting the pick events, because it
is on top of the first axes. This has been a problem for a long time, and
we haven't found a good solution for it.
On Tue, Jan 30, 2018 at 10:10 AM, Neal Becker <ndbecker2 at gmail.com> wrote:
> I find that pick events are fine until I add twiny. In that case, nothing
> happens when clicking.
> THe code outline is like:
> fig, ax = plt.subplots()
> ax2 = ax.twiny()
> fig.canvas.mpl_connect('pick_event', onpick)
> ax2_xaxis = np.linspace (*ax.get_xlim(), endpoint=True,)/conversion
> ax2.semilogy (ax2_xaxis, np.ones (len(ax2_xaxis)) * 1e-3, alpha=0)
> removing all the lines about ax2 will restore pick function.
> Matplotlib-users mailing list
> Matplotlib-users at python.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Matplotlib-users