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

Skip to content

Commit a5cf0c5

Browse files
author
astromancer
committed
simplify hstack
1 parent 05cd23a commit a5cf0c5

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

lib/matplotlib/patches.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1627,9 +1627,9 @@ def _recompute_path(self):
16271627
v1 = self._transform_verts(arc.vertices, a, b)
16281628
v2 = self._transform_verts(arc.vertices[::-1], a - w, b - w)
16291629
v = np.vstack([v1, v2, v1[0, :], (0, 0)])
1630-
c = np.hstack([arc.codes, arc.codes, Path.MOVETO, Path.CLOSEPOLY])
1631-
c[len(arc.codes)] = Path.MOVETO
1632-
1630+
c = np.hstack([arc.codes, Path.MOVETO,
1631+
arc.codes[1:], Path.MOVETO,
1632+
Path.CLOSEPOLY])
16331633
self._path = Path(v, c)
16341634

16351635
def get_path(self):

0 commit comments

Comments
 (0)