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

Skip to content

Commit b092bfd

Browse files
committed
Added %s support for labels.
1 parent 2847ad3 commit b092bfd

File tree

7 files changed

+374
-8
lines changed

7 files changed

+374
-8
lines changed

lib/matplotlib/artist.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -675,11 +675,9 @@ def set_label(self, s):
675675
676676
ACCEPTS: any string
677677
"""
678-
self._label = s
678+
self._label = '%s' % (s, )
679679
self.pchanged()
680680

681-
682-
683681
def get_zorder(self):
684682
"""
685683
Return the :class:`Artist`'s zorder.

lib/matplotlib/colorbar.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -401,7 +401,7 @@ def set_label(self, label, **kw):
401401
'''
402402
Label the long axis of the colorbar
403403
'''
404-
self._label = label
404+
self._label = '%s' % (label, )
405405
self._labelkw = kw
406406
self._set_label()
407407

lib/matplotlib/container.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ def set_label(self, s):
4343
4444
ACCEPTS: any string
4545
"""
46-
self._label = s
46+
self._label = '%s' % (s, )
4747
self.pchanged()
4848

4949
def add_callback(self, func):
Binary file not shown.
Lines changed: 357 additions & 0 deletions
Loading

0 commit comments

Comments
 (0)