Skip to content

Commit

Permalink
Merge pull request #1611 from segasai/master
Browse files Browse the repository at this point in the history
change handling of legend labels which are None
  • Loading branch information
mdboom committed Jan 16, 2013
2 parents 5da2d9d + 9c7ff84 commit a9dcdfd
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
5 changes: 4 additions & 1 deletion lib/matplotlib/artist.py
Expand Up @@ -686,7 +686,10 @@ def set_label(self, s):
ACCEPTS: string or anything printable with '%s' conversion.
"""
self._label = '%s' % (s, )
if s is not None:
self._label = '%s' % (s, )
else:
self._label = None
self.pchanged()

def get_zorder(self):
Expand Down
5 changes: 4 additions & 1 deletion lib/matplotlib/container.py
Expand Up @@ -44,7 +44,10 @@ def set_label(self, s):
ACCEPTS: string or anything printable with '%s' conversion.
"""
self._label = '%s' % (s, )
if s is not None:
self._label = '%s' % (s, )
else:
self._label = None
self.pchanged()

def add_callback(self, func):
Expand Down

0 comments on commit a9dcdfd

Please sign in to comment.