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

Skip to content

Commit 45a52de

Browse files
committed
Move image value to second line; remove mode info.
1 parent f7c7baf commit 45a52de

1 file changed

Lines changed: 5 additions & 10 deletions

File tree

lib/matplotlib/backend_bases.py

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2877,23 +2877,18 @@ def mouse_move(self, event):
28772877
except (ValueError, OverflowError):
28782878
pass
28792879
else:
2880+
s = s.rstrip()
28802881
artists = [a for a in event.inaxes._mouseover_set
28812882
if a.contains(event)[0] and a.get_visible()]
2882-
28832883
if artists:
28842884
a = cbook._topmost_artist(artists)
28852885
if a is not event.inaxes.patch:
28862886
data = a.get_cursor_data(event)
28872887
if data is not None:
2888-
data_str = a.format_cursor_data(data)
2889-
if data_str is not None:
2890-
s = s + ' ' + data_str
2891-
2892-
s = s.rstrip()
2893-
if len(self.mode):
2894-
self.set_message('%s, %s' % (self.mode, s))
2895-
else:
2896-
self.set_message(s)
2888+
data_str = a.format_cursor_data(data).rstrip()
2889+
if data_str:
2890+
s = s + '\n' + data_str
2891+
self.set_message(s)
28972892
else:
28982893
self.set_message(self.mode)
28992894

0 commit comments

Comments
 (0)