![]() On Thu, at 9:44 AM, Michael Kaufman wrote: plot axvlines here… etc. On Thu, at 12:01 PM, Thomas Caswell wrote: This is entirely intentional, and I an not sure there is a bug here to fix. Thomas those tools do “snarf” up pick events via the widgetlock mechanism, IIRC. On Thu, at 9:44 AM, Michael Kaufman wrote: Work going on (MEP22 iirc) to update the toolbar and make our tool ![]() That there is some logic underneath those tools that are snarfingĮvents when the are turned on to avoid messy conflicts. If you turn the zoom/pan tool off the picker works again. See this minimal example import matplotlib.pyplot as pltĬids.append(_connect('pick_event', pick))Ĭids.append(_connect('button_press_event', click)) This is the bottom of the plotting function:Ĭids.append(gcf().canvas.mpl_connect('pick_event',self.pick))Ĭids.append(gcf().canvas.mpl_connect('button_press_event',self.click))Īnybody got a clue what's going on? Does the Line2D get deleted and recreated without the picker enabled? I have to close the figure and make a new one to make the pick work again. The pick_event still doesn't work even if I disconnect all the events and recreate them (by creating a new object). The button_press_event that I also created still works after zooming/panning. But if I then zoom in or pan (using the toolbar tools) the pick_event function stops triggering. ![]() If I create a pick_event on an axvline (with picker=6), there is no problem triggering the pick event the first time the figure is shown (or many times if I _don't_ zoom or pan). ![]()
0 Comments
Leave a Reply. |