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

Skip to content

Commit e7a2e52

Browse files
update set_drawstyle
Invalidate path on set_drawstyle to recache path, such that the new drawstyle is actually applied. Fixes #10338
1 parent b2a9e10 commit e7a2e52

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

lib/matplotlib/lines.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1002,6 +1002,8 @@ def set_drawstyle(self, drawstyle):
10021002
raise ValueError('Unrecognized drawstyle {!r}'.format(drawstyle))
10031003
if self._drawstyle != drawstyle:
10041004
self.stale = True
1005+
# invalidate to trigger a recache of the path
1006+
self._invalidx = True
10051007
self._drawstyle = drawstyle
10061008

10071009
def set_linewidth(self, w):

0 commit comments

Comments
 (0)