From 6fc845c100a639c85e818d57597bf18ce45d081d Mon Sep 17 00:00:00 2001 From: Ioannis Filippidis Date: Wed, 21 Feb 2024 10:48:04 +0200 Subject: [PATCH] MNT: pass as keyword-argument to `mpl.patches.Polygon()` In `matplotlib > 3.5.3`, the parameter `closed` of `matplotlib.patches.Polygon.__init__()` is a keyword-only argument. --- polytope/polytope.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/polytope/polytope.py b/polytope/polytope.py index 57a41df..21104f5 100755 --- a/polytope/polytope.py +++ b/polytope/polytope.py @@ -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