MCPcopy Index your code
hub / github.com/matplotlib/matplotlib / InvertedLogTransform

Class InvertedLogTransform

lib/matplotlib/scale.py:359–378  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

357
358
359class InvertedLogTransform(Transform):
360 input_dims = output_dims = 1
361
362 def __init__(self, base):
363 super().__init__()
364 self.base = base
365 self._exp_funcs = {np.e: np.exp, 2: np.exp2}
366
367 def __str__(self):
368 return f"{type(self).__name__}(base={self.base})"
369
370 def transform_non_affine(self, values):
371 exp_func = self._exp_funcs.get(self.base)
372 if exp_func:
373 return exp_func(values)
374 else:
375 return np.exp(values * np.log(self.base))
376
377 def inverted(self):
378 return LogTransform(self.base)
379
380
381class LogScale(ScaleBase):

Callers 1

invertedMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…