How data values become positions along an axis (or steps along a color ramp). The plots hold data in its own units; a transform is applied only when drawing, so the same figure can be shown on a linear or a log axis.
apply gives NaN for a value with no position of its own: zero or a negative number under Log10. The renderer does not leave such a value out: what is at 0 on a log axis sits on a -∞ line below the lowest number, and a log axis with a negative value is drawn as a symmetric log (Transform.SymLog), which it says under the plot. Only what is not a number at all is left out, and counted.
final case class Custom(name: String, forward: Double=>Double, backward: Double=>Double)
A transform of your own: forward gives the position of a value (NaN for a value with none), backward its inverse; ticks are round numbers of the data, as on a square-root axis. Two axes are on one scale when they share the same functions (so a val keeps one): Transform.Custom("cube root", math.cbrt, v => v * v * v).
A transform of your own: forward gives the position of a value (NaN for a value with none), backward its inverse; ticks are round numbers of the data, as on a square-root axis. Two axes are on one scale when they share the same functions (so a val keeps one): Transform.Custom("cube root", math.cbrt, v => v * v * v).
Base-10 logarithm: equal steps are equal ratios. On an axis, what is at 0 (an H0 bar's birth) sits on a -∞ line below the lowest number, and an axis with a negative value is drawn as a symmetric log.
Base-10 logarithm: equal steps are equal ratios. On an axis, what is at 0 (an H0 bar's birth) sits on a -∞ line below the lowest number, and an axis with a negative value is drawn as a symmetric log.
Logarithmic away from zero, linear within linear of it: sign(v) * log10(1 + |v| / linear). Keeps zero and negative values on a log-like axis. linear is the size of the linear stretch around zero, in data units.
Logarithmic away from zero, linear within linear of it: sign(v) * log10(1 + |v| / linear). Keeps zero and negative values on a log-like axis. linear is the size of the linear stretch around zero, in data units.