Skip to content

Commit

Permalink
Merge pull request #22907 from raphaelquast/fix_QuadMesh_cursor_data
Browse files Browse the repository at this point in the history
Fix quad mesh cursor data
  • Loading branch information
QuLogic committed Apr 30, 2022
2 parents fabcc6b + 2b10e52 commit 89b21b5
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/matplotlib/collections.py
Original file line number Diff line number Diff line change
Expand Up @@ -2201,6 +2201,7 @@ def get_cursor_data(self, event):
contained, info = self.contains(event)
if len(info["ind"]) == 1:
ind, = info["ind"]
return self.get_array()[ind]
array = self.get_array()
return array[ind] if array else None
else:
return None

0 comments on commit 89b21b5

Please sign in to comment.