Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit cd0e52b

Browse files
committed
Update name to cursor_data
1 parent 70983ff commit cd0e52b

3 files changed

Lines changed: 8 additions & 8 deletions

File tree

lib/matplotlib/artist.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -903,15 +903,15 @@ def matchfunc(x):
903903
artists.append(self)
904904
return artists
905905

906-
def get_pixel_data(self, event):
906+
def get_cursor_data(self, event):
907907
"""
908-
Get the pixel data for a given event.
908+
Get the cursor data for a given event.
909909
"""
910910
return None
911911

912-
def format_pixel_data(self, data):
912+
def format_cursor_data(self, data):
913913
"""
914-
Return *pixel data* string formatted.
914+
Return *cursor data* string formatted.
915915
"""
916916
try:
917917
data[0]

lib/matplotlib/backend_bases.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2800,9 +2800,9 @@ def mouse_move(self, event):
28002800
artists.sort(key=lambda x: x.zorder)
28012801
if artists:
28022802
a = artists[-1]
2803-
data = a.get_pixel_data(event)
2803+
data = a.get_cursor_data(event)
28042804
if data is not None:
2805-
s += ' [%s]' % a.format_pixel_data(data)
2805+
s += ' [%s]' % a.format_cursor_data(data)
28062806
if len(self.mode):
28072807
self.set_message('%s, %s' % (self.mode, s))
28082808
else:

lib/matplotlib/image.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -683,8 +683,8 @@ def get_extent(self):
683683
else:
684684
return (-0.5, numcols-0.5, -0.5, numrows-0.5)
685685

686-
def get_pixel_data(self, event):
687-
"""Get the pixel data for a given event"""
686+
def get_cursor_data(self, event):
687+
"""Get the cursor data for a given event"""
688688
xmin, xmax, ymin, ymax = self.get_extent()
689689
if self.origin == 'upper':
690690
ymin, ymax = ymax, ymin

0 commit comments

Comments
 (0)