File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed
Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -347,17 +347,19 @@ class InvertedSymmetricalLogTransform(Transform):
347347
348348 def __init__ (self , base , linthresh , linscale ):
349349 Transform .__init__ (self )
350+ symlog = SymmetricalLogScale .SymmetricalLogTransform (base , linthresh , linscale )
350351 self .base = base
351352 self .linthresh = linthresh
353+ self .invlinthresh = symlog .transform (linthresh )
352354 self .linscale = linscale
353355 self ._linscale_adj = (linscale / (1.0 - self .base ** - 1 ))
354356
355357 def transform (self , a ):
356358 sign = np .sign (a )
357- masked = ma .masked_inside (a , - self .linthresh , self .linthresh , copy = False )
359+ masked = ma .masked_inside (a , - self .invlinthresh , self .invlinthresh , copy = False )
358360 exp = sign * self .linthresh * (
359- ma .power (self .base , sign * (masked / self .linthresh ))
360- - self ._linscale_adj )
361+ ma .power(self .base , ( sign * (masked / self .linthresh ))
362+ - self ._linscale_adj ))
361363 if masked .mask .any ():
362364 return ma .where (masked .mask , a / self ._linscale_adj , exp )
363365 else :
You can’t perform that action at this time.
0 commit comments