Skip to content

Commit fe63689

Browse files
committed
do not convert None labels to 'None'
1 parent 32149e4 commit fe63689

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

lib/matplotlib/artist.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -686,7 +686,10 @@ def set_label(self, s):
686686
687687
ACCEPTS: string or anything printable with '%s' conversion.
688688
"""
689-
self._label = '%s' % (s, )
689+
if s is not None:
690+
self._label = '%s' % (s, )
691+
else:
692+
self._label = None
690693
self.pchanged()
691694

692695
def get_zorder(self):

0 commit comments

Comments
 (0)