We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 3420565 commit f5cca25Copy full SHA for f5cca25
lib/matplotlib/collections.py
@@ -2213,6 +2213,7 @@ def get_cursor_data(self, event):
2213
contained, info = self.contains(event)
2214
if len(info["ind"]) == 1:
2215
ind, = info["ind"]
2216
- return self.get_array()[ind]
+ array = self.get_array()
2217
+ return array[ind] if array else None
2218
else:
2219
return None
0 commit comments