From 8439681b36c2ee0822179f3fbe9b433535e1cee8 Mon Sep 17 00:00:00 2001 From: Sergey B Kirpichev Date: Sun, 17 Dec 2017 14:07:03 +0300 Subject: [PATCH] Backport PR #10030: Fix using .get_color() and friends in labels handling --- lib/matplotlib/legend.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/matplotlib/legend.py b/lib/matplotlib/legend.py index 269f93f345dd..af4e8c111757 100644 --- a/lib/matplotlib/legend.py +++ b/lib/matplotlib/legend.py @@ -1336,17 +1336,17 @@ def _in_handles(h, l): if type(f_h) != type(h): continue try: - if f_h.get_color() != h.get_color(): + if (f_h.get_color() != h.get_color()).any(): continue except AttributeError: pass try: - if f_h.get_facecolor() != h.get_facecolor(): + if (f_h.get_facecolor() != h.get_facecolor()).any(): continue except AttributeError: pass try: - if f_h.get_edgecolor() != h.get_edgecolor(): + if (f_h.get_edgecolor() != h.get_edgecolor()).any(): continue except AttributeError: pass