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

Skip to content

Commit 879a3ce

Browse files
committed
Make all arguments to Collection and most to subclasses keyword only
1 parent 191fa92 commit 879a3ce

File tree

1 file changed

+6
-11
lines changed

1 file changed

+6
-11
lines changed

lib/matplotlib/collections.py

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -74,8 +74,7 @@ class Collection(artist.Artist, cm.ScalarMappable):
7474
_edge_default = False
7575

7676
@_docstring.interpd
77-
@_api.make_keyword_only("3.6", name="edgecolors")
78-
def __init__(self,
77+
def __init__(self, *,
7978
edgecolors=None,
8079
facecolors=None,
8180
linewidths=None,
@@ -90,7 +89,6 @@ def __init__(self,
9089
pickradius=5.0,
9190
hatch=None,
9291
urls=None,
93-
*,
9492
zorder=1,
9593
**kwargs
9694
):
@@ -1148,8 +1146,7 @@ def legend_elements(self, prop="colors", num="auto",
11481146

11491147
class PolyCollection(_CollectionWithSizes):
11501148

1151-
@_api.make_keyword_only("3.6", name="closed")
1152-
def __init__(self, verts, sizes=None, closed=True, **kwargs):
1149+
def __init__(self, verts, sizes=None, *, closed=True, **kwargs):
11531150
"""
11541151
Parameters
11551152
----------
@@ -1279,9 +1276,9 @@ class RegularPolyCollection(_CollectionWithSizes):
12791276
_path_generator = mpath.Path.unit_regular_polygon
12801277
_factor = np.pi ** (-1/2)
12811278

1282-
@_api.make_keyword_only("3.6", name="rotation")
12831279
def __init__(self,
12841280
numsides,
1281+
*,
12851282
rotation=0,
12861283
sizes=(1,),
12871284
**kwargs):
@@ -1492,10 +1489,10 @@ class EventCollection(LineCollection):
14921489

14931490
_edge_default = True
14941491

1495-
@_api.make_keyword_only("3.6", name="lineoffset")
14961492
def __init__(self,
14971493
positions, # Cannot be None.
14981494
orientation='horizontal',
1495+
*,
14991496
lineoffset=0,
15001497
linelength=1,
15011498
linewidth=None,
@@ -1688,8 +1685,7 @@ def __init__(self, sizes, **kwargs):
16881685
class EllipseCollection(Collection):
16891686
"""A collection of ellipses, drawn using splines."""
16901687

1691-
@_api.make_keyword_only("3.6", name="units")
1692-
def __init__(self, widths, heights, angles, units='points', **kwargs):
1688+
def __init__(self, widths, heights, angles, *, units='points', **kwargs):
16931689
"""
16941690
Parameters
16951691
----------
@@ -1776,8 +1772,7 @@ class PatchCollection(Collection):
17761772
collection of patches.
17771773
"""
17781774

1779-
@_api.make_keyword_only("3.6", name="match_original")
1780-
def __init__(self, patches, match_original=False, **kwargs):
1775+
def __init__(self, patches, *, match_original=False, **kwargs):
17811776
"""
17821777
Parameters
17831778
----------

0 commit comments

Comments
 (0)