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

Skip to content

Commit d5680c7

Browse files
committed
Fix bug in regular polygon handling
svn path=/branches/v1_0_maint/; revision=8647
1 parent 23fa33b commit d5680c7

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

lib/matplotlib/path.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -408,7 +408,7 @@ def unit_regular_polygon(cls, numVertices):
408408
# "points-up"
409409
theta += np.pi / 2.0
410410
verts = np.concatenate((np.cos(theta), np.sin(theta)), 1)
411-
codes = np.empty((numVertices,))
411+
codes = np.empty((numVertices + 1,))
412412
codes[0] = cls.MOVETO
413413
codes[1:-1] = cls.LINETO
414414
codes[-1] = cls.CLOSEPOLY

0 commit comments

Comments
 (0)