I'm having this really weird issue where a pick event is fired if you "scroll" while the mouse cursor is placed over the artist object of interest. Is this expected behaviour? To clarify, I'm using a Macbook, and by scroll I mean the two finger swipe (or one finger on a Magic Mouse).
The functionality I'm trying to achieve is have tooltips on certain axvspan segments (Polygon artist objects), and the pick event works if you click, but even if you scroll while the mouse is over one of the segments of interest, multiple pick events are fired.
I couldn't find anything online where people faced the same issue, and the doc isn't that clear on the firing of a pick event either (It just says: "fired when the user picks a location on the canvas sufficiently close to an artist"). What constitutes a "pick"?
EDIT: An example of what I am doing (these functions are part of a wxpython panel sub-class)
def plot(self):
for i in range(len(startTimes)):
self.axs.axvspan(startTimes[i], endTimes[i], color='blue', alpha=0.3, picker=True))
self.figure.canvas.mpl_connect('pick_event', self.onpick3)
def onpick3(self, event):
x = event.mouseevent.xdata
y = event.mouseevent.ydata
for i in range(len(startTimes)):
if x < endTimes[i] and x > startTimes[i]:
print segmentLabels[i]