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