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

Class AsinhTransform

lib/matplotlib/scale.py:644–659  ·  view source on GitHub ↗

Inverse hyperbolic-sine transformation used by `.AsinhScale`

Source from the content-addressed store, hash-verified

642
643
644class AsinhTransform(Transform):
645 """Inverse hyperbolic-sine transformation used by `.AsinhScale`"""
646 input_dims = output_dims = 1
647
648 def __init__(self, linear_width):
649 super().__init__()
650 if linear_width <= 0.0:
651 raise ValueError("Scale parameter 'linear_width' " +
652 "must be strictly positive")
653 self.linear_width = linear_width
654
655 def transform_non_affine(self, values):
656 return self.linear_width * np.arcsinh(values / self.linear_width)
657
658 def inverted(self):
659 return InvertedAsinhTransform(self.linear_width)
660
661
662class InvertedAsinhTransform(Transform):

Callers 3

test_transformsMethod · 0.90
invertedMethod · 0.85
__init__Method · 0.85

Calls

no outgoing calls

Tested by 1

test_transformsMethod · 0.72

Used in the wild real call sites across dependent graphs

searching dependent graphs…