A logarithmic scale is a way of displaying numerical data over a wide range of values in a way that can make it easier to visualize and interpret. Instead of each unit being the same size as on a linear scale, where equal intervals on the axis represent equal differences in value, a logarithmic scale represents equal intervals as equal ratios. In a logarithmic scale, each tick mark on the axis represents a power of a base number, commonly 10.
Articles by others on the same topic
A logarithmic scale places a positive quantity according to a logarithm, so equal ratios occupy equal distances. For example, are equally spaced under the natural logarithm because every successive difference is . An ordinary linear scale instead gives equal distances to equal differences: .
For a base and a positive reference , define the axis positionThe reference has the same units as , making a dimensionless quantity. The distance between two positions isMultiplying both values by the same positive factor preserves that distance. Replacing by translates every position by ; changing the base rescales positions through . Neither change alters which ratios receive equal gaps.
In base ten, the values occupy positions when . The differences between neighboring values grow from nine to ninety to nine hundred, but every step spans one order of magnitude. The values occupy positions : the same spacing shifted by . This lets one plot small and large positive quantities together while keeping equal proportional changes equally visible.
A logarithmic scale is a rule for position, not an instruction to relabel the tick marks with their logarithms. A mark labelled still means the original value one hundred. Ordinary real logarithms exclude zero and negative inputs. Omitting such values or clipping them to a plotting boundary does not give them genuine logarithmic positions; the plotting choice needs to be clear.[ref]
Log scale. Matplotlib 3.10.7 documentation; Matplotlib 3.10.7, Log scale: Logarithms with other bases and Dealing with negative values