8000 update set_drawstyle · matplotlib/matplotlib@e7a2e52 · GitHub
[go: up one dir, main page]

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
< 4B5E td data-grid-cell-id="diff-be677869a88f58790f2387fb2ac0ae12e2e9610d7c7096e25d3087d5ed9645c8-1004-1006-1" data-selected="false" role="gridcell" style="background-color:var(--diffBlob-additionNum-bgColor, var(--diffBlob-addition-bgColor-num));text-align:center" tabindex="-1" valign="top" class="focusable-grid-cell diff-line-number position-relative left-side">1006
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
+
self._invalidx = True
10051007
self._drawstyle = drawstyle
10061008

10071009
def set_linewidth(self, w):

0 commit comments

Comments
 (0)
0