When to Use a Log Scale
Use a log scale when your data spans several orders of magnitude or when the question is about growth rates rather than absolute amounts. On a log axis, equal vertical distances mean equal percentage changes, so exponential growth plots as a straight line.
When Does Data Need a Log Scale?
Switch to log when a linear axis squashes most of your values into a flat line at the bottom โ typical for incomes, city populations, file sizes, or epidemic case counts spanning 10x to 1000x ranges. If the largest value is more than ~100x the smallest, a linear axis is hiding most of the data.
import matplotlib.pyplot as plt
plt.plot(dates, daily_cases)
plt.yscale("log") # 10, 100, 1k, 10k now evenly spaced
plt.ylabel("Daily cases (log scale)")
Why Do Growth Rates Become Straight Lines on a Log Scale?
Constant percentage growth multiplies the value by the same factor each period, and a log axis turns multiplication into equal steps โ so 20% monthly growth is a straight line whose slope is the growth rate. That makes log charts the right tool for comparing growth: two series growing at the same rate are parallel lines, regardless of their absolute size.
import numpy as np
months = np.arange(24)
startup_a = 1_000 * 1.20 ** months # 20%/mo from 1k users
startup_b = 100_000 * 1.05 ** months # 5%/mo from 100k users
plt.plot(months, startup_a, label="A (20%/mo)")
plt.plot(months, startup_b, label="B (5%/mo)")
plt.yscale("log") # A's steeper slope is now obvious
How Do You Label a Log Scale So Readers Aren't Misled?
Say "log scale" in the axis label or subtitle, use round power-of-ten (or 1-2-5) tick labels with real values like "1k, 10k, 100k," and keep gridlines at every decade. Most readers assume linear axes, so an unannounced log axis makes explosive growth look tame and small gaps look large.
If the audience is non-technical, add one plain-language cue such as "each gridline is 10x the last." Never mix a log axis on one panel with linear axes on neighboring panels without flagging it.
What About Zero and Negative Values?
Log scales cannot show zero or negative numbers โ log(0) is undefined โ so a log chart silently drops or clips those points. For data with zeros or losses, use symlog (linear near zero, log beyond a threshold) or plot a transformed metric instead.
plt.yscale("symlog", linthresh=10) # linear within ยฑ10, log outside
Common Pitfalls
- Unlabeled log axes: the single biggest cause of misread charts โ always announce the scale.
- Reading gaps as amounts: on log paper, the visual gap shows the ratio, not the difference. Two lines 1 gridline apart differ by 10x everywhere.
- Log-scaled bar charts: bar length has no meaningful baseline on a log axis; use dots or lines instead.
- Silently dropped zeros: check how many points your plotting library discarded before publishing.
- Using log to flatter a slowdown: decelerating growth looks flat-ish on log axes; show the linear view too when absolute numbers matter.
Pro Tip: When presenting to a mixed audience, show the linear and log versions side by side as a pair โ linear answers "how big?", log answers "how fast?" โ and title each panel with the question it answers. The same pairing logic applies to line charts generally: match the axis to the question.
โ Back to Visualization Tips