Skip to content

Commit

Permalink
Fixed behaviour of the get_legend_handler method to match the origina…
Browse files Browse the repository at this point in the history
…l logic
  • Loading branch information
Kojoley committed Jun 29, 2016
1 parent a8ec8e4 commit 7d610d1
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions lib/matplotlib/legend.py
Expand Up @@ -568,12 +568,12 @@ def get_legend_handler(legend_handler_map, orig_handle):
try:
hash(orig_handle)
except TypeError:
return None

try:
return legend_handler_map[orig_handle]
except KeyError:
pass
else:
try:
return legend_handler_map[orig_handle]
except KeyError:
pass

for handle_type in type(orig_handle).mro():
try:
Expand Down

0 comments on commit 7d610d1

Please sign in to comment.