20
20
NullLocator , LogLocator , AutoLocator , AutoMinorLocator ,
21
21
SymmetricalLogLocator , LogitLocator )
22
22
from matplotlib .transforms import Transform , IdentityTransform
23
- from matplotlib .cbook import warn_deprecated
24
23
25
24
26
25
class ScaleBase :
@@ -41,7 +40,7 @@ class ScaleBase:
41
40
42
41
"""
43
42
44
- def __init__ (self , axis , ** kwargs ):
43
+ def __init__ (self , axis ):
45
44
r"""
46
45
Construct a new scale.
47
46
@@ -54,14 +53,6 @@ def __init__(self, axis, **kwargs):
54
53
be used: a single scale object should be usable by multiple
55
54
`~matplotlib.axis.Axis`\es at the same time.
56
55
"""
57
- if kwargs :
58
- warn_deprecated (
59
- '3.2' , removal = '3.4' ,
60
- message = (
61
- f"ScaleBase got an unexpected keyword argument "
62
- f"{ next (iter (kwargs ))!r} . This will become an error "
63
- "%(removal)s." )
64
- )
65
56
66
57
def get_transform (self ):
67
58
"""
@@ -95,13 +86,12 @@ class LinearScale(ScaleBase):
95
86
96
87
name = 'linear'
97
88
98
- def __init__ (self , axis , ** kwargs ):
89
+ def __init__ (self , axis ):
99
90
# This method is present only to prevent inheritance of the base class'
100
91
# constructor docstring, which would otherwise end up interpolated into
101
92
# the docstring of Axis.set_scale.
102
93
"""
103
94
"""
104
- super ().__init__ (axis , ** kwargs )
105
95
106
96
def set_default_locators_and_formatters (self , axis ):
107
97
# docstring inherited
@@ -302,15 +292,10 @@ def __init__(self, axis, **kwargs):
302
292
@cbook ._rename_parameter ("3.3" , f"nonpos{ axis_name } " , "nonpositive" )
303
293
def __init__ (* , base = 10 , subs = None , nonpositive = "clip" ):
304
294
return base , subs , nonpositive
295
+
305
296
base , subs , nonpositive = __init__ (** kwargs )
306
297
self ._transform = LogTransform (base , nonpositive )
307
298
self .subs = subs
308
- self ._nonpositive = nonpositive
309
- self ._axis_name = axis_name
310
-
311
- def __deepcopy__ (self , memo ):
312
- return self .__init__ (self ._axis_name , base = self .base , subs = self .subs ,
313
- nonpositive = self ._nonpositive )
314
299
315
300
base = property (lambda self : self ._transform .base )
316
301
@@ -485,15 +470,7 @@ def __init__(self, axis, **kwargs):
485
470
@cbook ._rename_parameter ("3.3" , f"linthresh{ axis_name } " , "linthresh" )
486
471
@cbook ._rename_parameter ("3.3" , f"subs{ axis_name } " , "subs" )
487
472
@cbook ._rename_parameter ("3.3" , f"linscale{ axis_name } " , "linscale" )
488
- def __init__ (* , base = 10 , linthresh = 2 , subs = None , linscale = 1 , ** kwargs ):
489
- if kwargs :
490
- warn_deprecated (
491
- '3.2' , removal = '3.4' ,
492
- message = (
493
- f"SymmetricalLogScale got an unexpected keyword "
494
- f"argument { next (iter (kwargs ))!r} . This will become "
495
- "an error %(removal)s." )
496
- )
473
+ def __init__ (* , base = 10 , linthresh = 2 , subs = None , linscale = 1 ):
497
474
return base , linthresh , subs , linscale
498
475
499
476
base , linthresh , subs , linscale = __init__ (** kwargs )
0 commit comments