Skip to content
Closed
Changes from all commits
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
13 changes: 8 additions & 5 deletions lib/matplotlib/patches.py
Original file line number Diff line number Diff line change
Expand Up @@ -499,11 +499,14 @@ def draw(self, renderer):

gc.set_foreground(self._edgecolor, isRGBA=True)

lw = self._linewidth
if self._edgecolor[3] == 0:
lw = 0
gc.set_linewidth(lw)
gc.set_linestyle(self._linestyle)
if (self._edgecolor[3] == 0 or
self._linestyle in {'none', 'None', ' ', '', None}):
Copy link
Member

Choose a reason for hiding this comment

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

Please do not include None in this check. We reserve None to mean 'do the default thing' not 'do nothing'.

# (some?) renderers expect this as no-edge signal
gc.set_linewidth(0.0)
else:
gc.set_linewidth(self._linewidth)
gc.set_linestyle(self._linestyle)

gc.set_capstyle(self._capstyle)
gc.set_joinstyle(self._joinstyle)

Expand Down