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

Skip to content

Commit 6d5ac9f

Browse files
committed
Make most arguments to Image classes keyword only
1 parent 238d778 commit 6d5ac9f

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

lib/matplotlib/image.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -902,8 +902,8 @@ class AxesImage(_ImageBase):
902902
**kwargs : `.Artist` properties
903903
"""
904904

905-
@_api.make_keyword_only("3.6", name="cmap")
906905
def __init__(self, ax,
906+
*,
907907
cmap=None,
908908
norm=None,
909909
interpolation=None,
@@ -912,7 +912,6 @@ def __init__(self, ax,
912912
filternorm=True,
913913
filterrad=4.0,
914914
resample=False,
915-
*,
916915
interpolation_stage=None,
917916
**kwargs
918917
):
@@ -1207,11 +1206,11 @@ class PcolorImage(AxesImage):
12071206
and it is used by pcolorfast for the corresponding grid type.
12081207
"""
12091208

1210-
@_api.make_keyword_only("3.6", name="cmap")
12111209
def __init__(self, ax,
12121210
x=None,
12131211
y=None,
12141212
A=None,
1213+
*,
12151214
cmap=None,
12161215
norm=None,
12171216
**kwargs
@@ -1359,8 +1358,8 @@ class FigureImage(_ImageBase):
13591358

13601359
_interpolation = 'nearest'
13611360

1362-
@_api.make_keyword_only("3.6", name="cmap")
13631361
def __init__(self, fig,
1362+
*,
13641363
cmap=None,
13651364
norm=None,
13661365
offsetx=0,
@@ -1418,8 +1417,8 @@ def set_data(self, A):
14181417
class BboxImage(_ImageBase):
14191418
"""The Image class whose size is determined by the given bbox."""
14201419

1421-
@_api.make_keyword_only("3.6", name="cmap")
14221420
def __init__(self, bbox,
1421+
*,
14231422
cmap=None,
14241423
norm=None,
14251424
interpolation=None,

0 commit comments

Comments
 (0)