{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "\n# Asinh scale\n\nIllustration of the `asinh <.scale.AsinhScale>` axis scaling,\nwhich uses the transformation\n\n\\begin{align}a \\rightarrow a_0 \\sinh^{-1} (a / a_0)\\end{align}\n\nFor coordinate values close to zero (i.e. much smaller than\nthe \"linear width\" $a_0$), this leaves values essentially unchanged:\n\n\\begin{align}a \\rightarrow a + \\mathcal{O}(a^3)\\end{align}\n\nbut for larger values (i.e. $|a| \\gg a_0$, this is asymptotically\n\n\\begin{align}a \\rightarrow a_0 \\, \\mathrm{sgn}(a) \\ln |a| + \\mathcal{O}(1)\\end{align}\n\nAs with the `symlog <.scale.SymmetricalLogScale>` scaling,\nthis allows one to plot quantities\nthat cover a very wide dynamic range that includes both positive\nand negative values. However, ``symlog`` involves a transformation\nthat has discontinuities in its gradient because it is built\nfrom *separate* linear and logarithmic transformations.\nThe ``asinh`` scaling uses a transformation that is smooth\nfor all (finite) values, which is both mathematically cleaner\nand reduces visual artifacts associated with an abrupt\ntransition between linear and logarithmic regions of the plot.\n\n
`.scale.AsinhScale` is experimental, and the API may change.