8000 Backport PR #22907: Fix quad mesh cursor data · matplotlib/matplotlib@f5cca25 · GitHub
[go: up one dir, main page]

Skip to content

Commit f5cca25

Browse files
QuLogicmeeseeksmachine
authored andcommitted
Backport PR #22907: Fix quad mesh cursor data
1 parent 3420565 commit f5cca25

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/matplotlib/collections.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2213,6 +2213,7 @@ def get_cursor_data(self, event):
22132213
contained, info = self.contains(event)
22142214
if len(info["ind"]) == 1:
22152215
ind, = info["ind"]
2216-
return self.get_array()[ind]
2216+
array = self.get_array()
2217+
return array[ind] if array else None
22172218
else:
22182219
return None

0 commit comments

Comments
 (0)
0