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

Skip to content

Commit e9be828

Browse files
committed
Fix ScalarFormatter formatting of masked values
1 parent bedb4d9 commit e9be828

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

lib/matplotlib/ticker.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -629,6 +629,8 @@ def format_data_short(self, value):
629629
"""
630630
if self._useLocale:
631631
return locale.format_string('%-12g', (value,))
632+
elif isinstance(value, np.ma.MaskedArray) and value.mask:
633+
return ''
632634
else:
633635
return '%-12g' % value
634636

0 commit comments

Comments
 (0)