A logarithmic scale for data with exponential distributions.
Useful when data spans many orders of magnitude.
Summary
Functions
Applies the scale to a value
Returns 0: a log scale has no bandwidth
Enables or disables clamping
Sets the domain (must be positive for log scale)
Inverts the scale
Creates a new log scale with optional base
Extends domain to nice powers of the base
Identity: a log scale has no padding
Sets the range
Generates about count tick values, as d3-scale's log ticks do.
Types
Functions
Applies the scale to a value
@spec bandwidth(t()) :: 0
Returns 0: a log scale has no bandwidth
Enables or disables clamping
Sets the domain (must be positive for log scale)
Inverts the scale
Creates a new log scale with optional base
Extends domain to nice powers of the base
Identity: a log scale has no padding
Sets the range
Generates about count tick values, as d3-scale's log ticks do.
When the domain spans fewer decades than count and the base is an integer, every
k · base^i (1 ≤ k < base) inside the domain is a tick — the familiar
1, 2, 3, … 9, 10, 20, 30 … — and, when that still yields fewer than count / 2 ticks,
linear ticks over the domain are used instead. Otherwise the exponents are thinned to
about count nice values and mapped back through the base.