Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit cc1756a

Browse files
committed
BUG : make plot(..., color='none') work again
Fixes matplotlib#2760 Fixes miss-handling of color conversion logic introduced in edc48f0
1 parent d2a9f6b commit cc1756a

File tree

1 file changed

+3
-8
lines changed

1 file changed

+3
-8
lines changed

lib/matplotlib/lines.py

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -527,7 +527,7 @@ def draw(self, renderer):
527527
self._set_gc_clip(gc)
528528

529529
ln_color_rgba = self._get_rgba_ln_color()
530-
gc.set_foreground(ln_color_rgba)
530+
gc.set_foreground(ln_color_rgba, isRGBA=True)
531531
gc.set_alpha(ln_color_rgba[3])
532532

533533
gc.set_antialiased(self._antialiased)
@@ -569,7 +569,7 @@ def draw(self, renderer):
569569
edgecolor = self.get_markeredgecolor()
570570
if is_string_like(edgecolor) and edgecolor.lower() == 'none':
571571
gc.set_linewidth(0)
572-
gc.set_foreground(rgbaFace)
572+
gc.set_foreground(rgbaFace, isRGBA=True)
573573
else:
574574
gc.set_foreground(edgecolor)
575575
gc.set_linewidth(self._markeredgewidth)
@@ -1031,12 +1031,7 @@ def _get_rgba_face(self, alt=False):
10311031
return rgbaFace
10321032

10331033
def _get_rgba_ln_color(self, alt=False):
1034-
ln_color = self._color
1035-
if is_string_like(ln_color) and ln_color.lower() == 'none':
1036-
rgba_ln = None
1037-
else:
1038-
rgba_ln = colorConverter.to_rgba(ln_color, self._alpha)
1039-
return rgba_ln
1034+
return colorConverter.to_rgba(self._color, self._alpha)
10401035

10411036
# some aliases....
10421037
def set_aa(self, val):

0 commit comments

Comments
 (0)