Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
BUG : make plot(..., color='none') work again
Fixes #2760

Fixes miss-handling of color conversion logic introduced in edc48f0
  • Loading branch information
tacaswell committed Jan 24, 2014
commit cc1756a9f2f618d3501eb4449d86ee2c255579b3
11 changes: 3 additions & 8 deletions lib/matplotlib/lines.py
Original file line number Diff line number Diff line change
Expand Up @@ -527,7 +527,7 @@ def draw(self, renderer):
self._set_gc_clip(gc)

ln_color_rgba = self._get_rgba_ln_color()
gc.set_foreground(ln_color_rgba)
gc.set_foreground(ln_color_rgba, isRGBA=True)
gc.set_alpha(ln_color_rgba[3])
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

_get_rgba_in_color() can return a None, so the indexing here would break.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

gah, just now noticed you changed _get_rgba_ln_color()


gc.set_antialiased(self._antialiased)
Expand Down Expand Up @@ -569,7 +569,7 @@ def draw(self, renderer):
edgecolor = self.get_markeredgecolor()
if is_string_like(edgecolor) and edgecolor.lower() == 'none':
gc.set_linewidth(0)
gc.set_foreground(rgbaFace)
gc.set_foreground(rgbaFace, isRGBA=True)
else:
gc.set_foreground(edgecolor)
gc.set_linewidth(self._markeredgewidth)
Expand Down Expand Up @@ -1031,12 +1031,7 @@ def _get_rgba_face(self, alt=False):
return rgbaFace

def _get_rgba_ln_color(self, alt=False):
ln_color = self._color
if is_string_like(ln_color) and ln_color.lower() == 'none':
rgba_ln = None
else:
rgba_ln = colorConverter.to_rgba(ln_color, self._alpha)
return rgba_ln
return colorConverter.to_rgba(self._color, self._alpha)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

so, does colorConverter now handle string names of "none"?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.


# some aliases....
def set_aa(self, val):
Expand Down