Skip to content

Commit

Permalink
MNT: pass as keyword-argument to mpl.patches.Polygon()
Browse files Browse the repository at this point in the history
In `matplotlib > 3.5.3`, the parameter `closed` of
`matplotlib.patches.Polygon.__init__()` is a
keyword-only argument.
  • Loading branch information
johnyf committed Feb 21, 2024
1 parent c80f0d0 commit 6fc845c
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion polytope/polytope.py
Original file line number Diff line number Diff line change
Expand Up @@ -2330,7 +2330,10 @@ def _get_patch(poly1, **kwargs):
angle = angle * corr
ind = np.argsort(angle)
# create patch
patch = mpl.patches.Polygon(V[ind, :], True, **kwargs)
patch = mpl.patches.Polygon(
V[ind, :],
closed=True,
**kwargs)
patch.set_zorder(0)
return patch

Expand Down

0 comments on commit 6fc845c

Please sign in to comment.