@@ -39,7 +39,7 @@ class ScaleBase:
39
39
40
40
"""
41
41
42
- def __init__ (self , axis , ** kwargs ):
42
+ def __init__ (self , axis ):
43
43
r"""
44
44
Construct a new scale.
45
45
@@ -143,8 +143,7 @@ def forward(values: array-like) -> array-like
143
143
self ._forward = forward
144
144
self ._inverse = inverse
145
145
else :
146
- raise ValueError ('arguments to FuncTransform must '
147
- 'be functions' )
146
+ raise ValueError ('arguments to FuncTransform must be functions' )
148
147
149
148
def transform_non_affine (self , values ):
150
149
return self ._forward (values )
@@ -382,16 +381,14 @@ def __init__(self, axis, **kwargs):
382
381
nonpos = kwargs .pop ('nonposy' , 'clip' )
383
382
cbook ._check_in_list (['mask' , 'clip' ], nonposy = nonpos )
384
383
385
- if len (kwargs ):
386
- raise ValueError (("provided too many kwargs, can only pass "
387
- "{'basex', 'subsx', nonposx'} or "
388
- "{'basey', 'subsy', nonposy'}. You passed " ) +
389
- "{!r}" .format (kwargs ))
384
+ if kwargs :
385
+ raise TypeError (f"LogScale got an unexpected keyword "
386
+ f"argument { next (iter (kwargs ))!r} " )
390
387
391
388
if base <= 0 or base == 1 :
392
389
raise ValueError ('The log base cannot be <= 0 or == 1' )
393
390
394
- self ._transform = self . LogTransform (base , nonpos )
<
8000
/tr>
391
+ self ._transform = LogTransform (base , nonpos )
395
392
self .subs = subs
396
393
397
394
@property
@@ -566,18 +563,17 @@ def __init__(self, axis, **kwargs):
566
563
linthresh = kwargs .pop ('linthreshy' , 2.0 )
567
564
subs = kwargs .pop ('subsy' , None )
568
565
linscale = kwargs .pop ('linscaley' , 1.0 )
569
-
566
+ if kwargs :
567
+ raise TypeError (f"SymmetricalLogScale got an unexpected keyword "
568
+ f"argument { next (iter (kwargs ))!r} " )
570
569
if base <= 1.0 :
571
570
raise ValueError ("'basex/basey' must be larger than 1" )
572
571
if linthresh <= 0.0 :
573
572
raise ValueError ("'linthreshx/linthreshy' must be positive" )
574
573
if linscale <= 0.0 :
575
574
raise ValueError ("'linscalex/linthreshy' must be positive" )
576
575
577
- self ._transform = self .SymmetricalLogTransform (base ,
578
- linthresh ,
579
- linscale )
580
-
576
+ self ._transform = SymmetricalLogTransform (base , linthresh , linscale )
581
577
self .base = base
582
578
self .linthresh = linthresh
583
579
self .linscale = linscale
0 commit comments