@@ -1415,13 +1415,14 @@ def __call__(self, value, clip=None):
14151415 return super ().__call__ (value , clip = clip )
14161416
14171417
1418- def _make_norm_from_scale (scale_cls , base_norm_cls = None , * , init = None ):
1418+ def make_norm_from_scale (scale_cls , base_norm_cls = None , * , init = None ):
14191419 """
1420- Decorator for building a `.Normalize` subclass from a `.Scale` subclass.
1420+ Decorator for building a `.Normalize` subclass from a `~.scale.ScaleBase`
1421+ subclass.
14211422
14221423 After ::
14231424
1424- @_make_norm_from_scale (scale_cls)
1425+ @make_norm_from_scale (scale_cls)
14251426 class norm_cls(Normalize):
14261427 ...
14271428
@@ -1436,7 +1437,7 @@ class norm_cls(Normalize):
14361437 a dummy axis).
14371438
14381439 If the *scale_cls* constructor takes additional parameters, then *init*
1439- should be passed to `_make_norm_from_scale `. It is a callable which is
1440+ should be passed to `make_norm_from_scale `. It is a callable which is
14401441 *only* used for its signature. First, this signature will become the
14411442 signature of *norm_cls*. Second, the *norm_cls* constructor will bind the
14421443 parameters passed to it using this signature, extract the bound *vmin*,
@@ -1446,7 +1447,7 @@ class norm_cls(Normalize):
14461447 """
14471448
14481449 if base_norm_cls is None :
1449- return functools .partial (_make_norm_from_scale , scale_cls , init = init )
1450+ return functools .partial (make_norm_from_scale , scale_cls , init = init )
14501451
14511452 if init is None :
14521453 def init (vmin = None , vmax = None , clip = False ): pass
@@ -1509,7 +1510,7 @@ def inverse(self, value):
15091510 return Norm
15101511
15111512
1512- @_make_norm_from_scale (
1513+ @make_norm_from_scale (
15131514 scale .FuncScale ,
15141515 init = lambda functions , vmin = None , vmax = None , clip = False : None )
15151516class FuncNorm (Normalize ):
@@ -1542,7 +1543,7 @@ def forward(values: array-like) -> array-like
15421543 """
15431544
15441545
1545- @_make_norm_from_scale (functools .partial (scale .LogScale , nonpositive = "mask" ))
1546+ @make_norm_from_scale (functools .partial (scale .LogScale , nonpositive = "mask" ))
15461547class LogNorm (Normalize ):
15471548 """Normalize a given value to the 0-1 range on a log scale."""
15481549
@@ -1555,7 +1556,7 @@ def autoscale_None(self, A):
15551556 super ().autoscale_None (np .ma .array (A , mask = (A <= 0 )))
15561557
15571558
1558- @_make_norm_from_scale (
1559+ @make_norm_from_scale (
15591560 scale .SymmetricalLogScale ,
15601561 init = lambda linthresh , linscale = 1. , vmin = None , vmax = None , clip = False , * ,
15611562 base = 10 : None )
0 commit comments