Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

change handling of legend labels which are None #1611

Merged
merged 2 commits into from

4 participants

@segasai

Fixes #1610

@mdboom
Owner

+1

@WeatherGod
Collaborator

Travis build failure is a dud (timeout error while downloading PIL). It only occurred for the py2.7 test.

Note that this PR is against master branch only. Shall we cherry-pick to v1.2.x branch?

@segasai

I think, it is worth a patch for 1.2.x branch. (I won't do this cherry-picking myself, because I'm not sure what's the best way to do it on github).

@dmcdougall
Collaborator

The preferred method is to branch off of v1.2.x and patch the maintenance branch. Then when v1.2.x is merged into master the new changes will apply to master.

@segasai Are you comfortable doing this?

@dmcdougall dmcdougall was assigned
@mdboom
Owner

No worries. I'll merge this and cherry-pick it back to 1.2.x myself.

@mdboom mdboom merged commit a9dcdfd into matplotlib:master
@dmcdougall dmcdougall referenced this pull request
Closed

plotting legends none #1610

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
This page is out of date. Refresh to see the latest.
Showing with 8 additions and 2 deletions.
  1. +4 −1 lib/matplotlib/artist.py
  2. +4 −1 lib/matplotlib/container.py
View
5 lib/matplotlib/artist.py
@@ -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):
View
5 lib/matplotlib/container.py
@@ -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):
Something went wrong with that request. Please try again.