Skip to course content
Free data visualization course

Data Visualization and Dashboard Storytelling

Unit 03.02: Linear and log, and when each one lies

A log axis makes wide-ranging data readable and changes what a straight line means.

Equal distances become equal ratios

Five values spanning four orders of magnitude, positioned linearly and logarithmically.

The code shows both positions.

import numpy as np

values = np.array([2, 20, 200, 2000, 20000])
print(f"{'value':>8} {'linear position':>16} {'log10 position':>15}")
for v in values:
    print(f"{v:>8,} {v / values.max():>16.4f} {np.log10(v):>15.3f}")

print("""
On a linear axis the first three values are indistinguishable -- they occupy
the bottom 1% of the space. On a log axis each tenfold step is the same
distance, so all five are readable.

What a log axis costs: equal visual distances now mean equal RATIOS, not equal
differences. A reader who does not notice the axis will read a straight line
as steady growth when it is compounding growth. Label it loudly.
""")

On the linear axis the first three values occupy the bottom one percent of the space and are indistinguishable. On the log axis each tenfold step is the same distance, so all five are readable.

The cost is that a straight line no longer means steady growth - it means *compounding* growth. A reader who does not notice the axis will read a log chart as far less dramatic than it is.

The mistake this prevents

The mistake is using a log axis to make an alarming chart look calmer. It is a legitimate technique for wide-ranging data and a misleading one when chosen because the linear version was inconvenient. Label it prominently either way.

Takeaway

Log axes make wide ranges readable and turn equal distances into equal ratios. Label them loudly - an unlabelled log axis understates growth to any reader who does not check.