8000 fix QuadMesh get_cursor_data if no array is set · matplotlib/matplotlib@d522504 · GitHub
[go: up one dir, main page]

Skip to content

Commit d522504

Browse files
authored
fix QuadMesh get_cursor_data if no array is set
1 parent 541a786 commit d522504

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
@@ -2218,6 +2218,7 @@ def get_cursor_data(self, event):
22182218
contained, info = self.contains(event)
22192219
if len(info["ind"]) == 1:
22202220
ind, = info["ind"]
2221-
return self.get_array()[ind]
2221+
array = self.get_array()
2222+
return self.get_array()[ind] if array else None
22222223
else:
22232224
return None

0 commit comments

Comments
 (0)
0