Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 5079b6d + 0b5185b commit 6ab156fCopy full SHA for 6ab156f
1 file changed
lib/matplotlib/artist.py
@@ -350,11 +350,14 @@ def pick(self, mouseevent):
350
for a in self.get_children():
351
# make sure the event happened in the same axes
352
ax = getattr(a, 'axes', None)
353
- if mouseevent.inaxes is None or mouseevent.inaxes == ax:
+ if mouseevent.inaxes is None or ax is None or \
354
+ mouseevent.inaxes == ax:
355
# we need to check if mouseevent.inaxes is None
356
# because some objects associated with an axes (e.g., a
357
# tick label) can be outside the bounding box of the
358
# axes and inaxes will be None
359
+ # also check that ax is None so that it traverse objects
360
+ # which do no have an axes property but children might
361
a.pick(mouseevent)
362
363
def set_picker(self, picker):
0 commit comments