diff --git a/lib/matplotlib/lines.py b/lib/matplotlib/lines.py index e12bcd879c7a..10541c78b170 100644 --- a/lib/matplotlib/lines.py +++ b/lib/matplotlib/lines.py @@ -1160,7 +1160,8 @@ def set_markeredgecolor(self, ec): """ if ec is None: ec = 'auto' - if self._markeredgecolor is None or self._markeredgecolor != ec: + if self._markeredgecolor is None or \ + np.any(self._markeredgecolor != ec): self.stale = True self._markeredgecolor = ec @@ -1184,7 +1185,7 @@ def set_markerfacecolor(self, fc): """ if fc is None: fc = 'auto' - if self._markerfacecolor != fc: + if np.any(self._markerfacecolor != fc): self.stale = True self._markerfacecolor = fc @@ -1196,7 +1197,7 @@ def set_markerfacecoloralt(self, fc): """ if fc is None: fc = 'auto' - if self._markerfacecoloralt != fc: + if np.any(self._markerfacecoloralt != fc): self.stale = True self._markerfacecoloralt = fc diff --git a/lib/matplotlib/tests/test_lines.py b/lib/matplotlib/tests/test_lines.py index 2adef4d1abae..83939cfce0a7 100644 --- a/lib/matplotlib/tests/test_lines.py +++ b/lib/matplotlib/tests/test_lines.py @@ -143,7 +143,8 @@ def test_set_line_coll_dash_image(): @image_comparison(baseline_images=['marker_fill_styles'], remove_text=True, extensions=['png']) def test_marker_fill_styles(): - colors = itertools.cycle(['b', 'g', 'r', 'c', 'm', 'y', 'k']) + colors = itertools.cycle([[0, 0, 1], 'g', '#ff0000', 'c', 'm', 'y', + np.array([0, 0, 0])]) altcolor = 'lightgreen' y = np.array([1, 1])