# 双对数图

双对数图是一种二维图形，其横轴与纵轴均采用对数刻度，因此纸面上相等的距离代表相等的比例，而非所绘量之间相等的差值。它的核心特性是：形如 \( y = a x^{b} \) 的幂律关系表现为一条直线，其指数 \( b \) 等于该直线的斜率。<sup>[1](https://www.nature.com/articles/052272a0)</sup>

| 关键事实 | 详情 |
|---|---|
| 定义性特征 | 两轴均为对数刻度；相等距离意味着相等比例，每个主分度对应十倍变化（一个数量级）<sup>[1](https://www.nature.com/articles/052272a0)</sup> |
| 直线的含义 | 服从 \( y = a x^{b} \) 的数据绘成一条直线，其斜率为指数 \( b \)；在 \( x = 1 \) 处读取的截距给出 \( \log a \)<sup>[1](https://www.nature.com/articles/052272a0)</sup><sup> • </sup><sup>[5](https://www.physics.uoguelph.ca/graphing-logarithmic-paper-tutorial)</sup> |
| 定义域限制 | 对数在零和负数处无定义，因此双对数图只能显示正值<sup>[4](https://www.graphpad.com/support/faq/why-are-negative-values-and-zero-missing-from-graphs-using-a-logarithmic-axis/)</sup> |
| 历史文献 | 对数格纸于1883年在英国获得专利；C. V. 博伊斯于1895年在《自然》上描述了它的用法<sup>[9](https://www.datavis.ca/milestones/index.php/index.php?group=1850%2B&mid=ms125)</sup><sup> • </sup><sup>[1](https://www.nature.com/articles/052272a0)</sup> |
| 软件形式 | 在 Matplotlib 中，`Axes.loglog` 是 `plot` 的一层薄封装，将两轴均设为对数刻度，默认底数为10，并通过 `nonpositive` 参数以 'mask' 或 'clip' 处理非正值<sup>[2](https://matplotlib.org/stable/api/_as_gen/matplotlib.axes.Axes.loglog.html)</sup> |
| 拟合注意事项 | 对双对数变换后的数据进行线性拟合会得到有偏的指数估计；最大似然估计更为稳健<sup>[7](https://arxiv.org/abs/cond-mat/0402322)</sup> |

## 坐标轴的含义

在普通的方格纸上，一条倾斜的直线代表线性方程 \( y = a + bx \)。在对数纸上，相应的直线代表 \( y = a x^{b} \)。英国物理学家 C. V. 博伊斯（C. V. Boys）在1895年《自然》的一篇文章中解释了其构造：纸面以大的单位方格划分，每个方格代表各坐标的十倍变化，因此两个单位代表100，三个单位代表1000，而每个方格内再按与2、3、4等的对数成比例的距离细分，其方式与计算尺的细分相同。<sup>[1](https://www.nature.com/articles/052272a0)</sup>

其结果是：只要一个量随另一个量的任意次幂（正、负、整数或分数）变化，一条位置和倾角适当的直线就能表示该关系，而指数等于倾角的正切值。<sup>[1](https://www.nature.com/articles/052272a0)</sup> 对 \( y = a x^{b} \) 两边取对数，得到 \( \log y = \log a + b \log x \)，它在取对数后的变量中具有直线的形式。斜率 \( b \) 可以用任意底数的对数计算，只要全程使用同一底数即可；由于对数不带单位，斜率本身也没有单位。<sup>[5](https://www.physics.uoguelph.ca/graphing-logarithmic-paper-tutorial)</sup>

截距需要小心处理。由于横轴是对数刻度，\( \log x = 0 \) 的点对应 \( x = 1 \)，因此 \( y \) 截距应沿 \( x = 1 \) 处的竖线读取，而不是在图的左边缘读取。如果所绘的 \( x \) 值都大于1，则无法直接读出截距，必须通过将数值代入 \( y = a x^{b} \) 来反推。<sup>[5](https://www.physics.uoguelph.ca/graphing-logarithmic-paper-tutorial)</sup>

## 读取双对数图

每个轴上的刻度标记以十倍递增（1、10、100、1000），而非按等间隔排列；每个数量级内部的细分位于2到9的对数处，因此网格线之间的间距在每个数量级的高端被压缩。<sup>[1](https://www.nature.com/articles/052272a0)</sup> 例如，斜率为 −2 意味着 \( x \) 加倍会使 \( y \) 减小为原来的四分之一；麻省理工学院的教材《洞察的艺术》正是用这种读法来处理引力的平方反比定律 \( g \propto r^{-2} \)——它在线性轴上是一条难以辨认的双曲线，而在双对数轴上则是一条斜率 −2 的明显直线。<sup>[6](https://ocw.mit.edu/courses/res-6-011-the-art-of-insight-in-science-and-engineering-mastering-complexity-fall-2014/3bca850386a3005c22134fa62fb3bad5_MITRES_6-011F14_art_insfin.pdf)</sup>

曲线的弯曲也有含义。如果指数随坐标变化而逐渐改变，图显示的便是一条曲线而非直线；曲线的大小和形状抽象地表示定律，而曲线在纸上的位置则编码了特定情形和单位下的实际数值。只需整体平移曲线，就能将同一定律适配到新的情形或新的单位——博伊斯将这一点归功于奥斯本·雷诺兹（Osborne Reynolds）教授。<sup>[1](https://www.nature.com/articles/052272a0)</sup>

## 双对数图无法显示的内容

对数在数学上对零或任何负值均无定义，因此双对数图在两轴上都没有 0.0 或负数的位置。<sup>[4](https://www.graphpad.com/support/faq/why-are-negative-values-and-zero-missing-from-graphs-using-a-logarithmic-axis/)</sup><sup> • </sup><sup>[3](https://www.graphpad.com/support/faqid/1487/)</sup> 绘图软件以确定的方式处理不合规的值：Matplotlib 的 `loglog` 接受一个 `nonpositive` 参数，可将非正值掩蔽为无效，或将其裁剪为一个极小的正数，默认为 'clip'。<sup>[2](https://matplotlib.org/stable/api/_as_gen/matplotlib.axes.Axes.loglog.html)</sup> 在数据分析中，因减去基线而产生的零和负值，可以通过在分析中拟合基线来处理，或在取对数前给每个值加上一个正常数。<sup>[8](https://pmc.ncbi.nlm.nih.gov/articles/PMC12163497/)</sup>

## 历史

统计图形史的“里程碑”项目将莱昂·拉兰（Léon Lalanne）1846年的对数网格认定为早期双对数图及用于显示因子乘积的诺模图装置，并将威廉·斯坦利·杰文斯（William Stanley Jevons）1863年的半对数网格认定为显示商品百分比变化的手段。<sup>[10](https://archania.org/p/arch-history/thematic-histories/the-history-of-grids)</sup> 对数纸的专利于1883年在英国颁发，此类纸也被称为“半对数”纸、“算术对数”纸和“比例图”。<sup>[9](https://www.datavis.ca/milestones/index.php/index.php?group=1850%2B&mid=ms125)</sup> 到1895年，现成的对数格纸已可商业购得，博伊斯将其归功于一位名叫休曼（Human）先生的造纸商，并指出在没有这种纸的情况下，可以直接从一把好的计算尺上刺取距离来进行对数绘图。<sup>[1](https://www.nature.com/articles/052272a0)</sup>

## 用途

**检验幂律。** 经典用途是诊断性的：如果对疑似幂律的数据作双对数图得到近似直线，则幂律假设得到支持，斜率给出指数。<sup>[5](https://www.physics.uoguelph.ca/graphing-logarithmic-paper-tutorial)</sup> 在可靠性工程中，用失效数据计算出点并绘于对数轴上；当这些点大致沿直线分布时，分析者便以此作为所假设的寿命分布模型拟合数据的证据；而当数据来自可修复系统时，同类的图可给出 NHPP 幂律模型的杜安图（Duane plot）。<sup>[11](https://www.itl.nist.gov/div898/handbook/apr/section2/apr22.htm)</sup>

**标度关系。** 许多自然和工程系统遵循标度关系，在对数刻度上这些关系变成直线，其斜率即为标度指数。<sup>[6](https://ocw.mit.edu/courses/res-6-011-the-art-of-insight-in-science-and-engineering-mastering-complexity-fall-2014/3bca850386a3005c22134fa62fb3bad5_MITRES_6-011F14_art_insfin.pdf)</sup> 齐普夫定律（Zipf's law）——第 \( k \) 个最常见词的频率正比于 \( 1/k \)——就是在双对数轴上考察的标准例子。<sup>[6](https://ocw.mit.edu/courses/res-6-011-the-art-of-insight-in-science-and-engineering-mastering-complexity-fall-2014/3bca850386a3005c22134fa62fb3bad5_MITRES_6-011F14_art_insfin.pdf)</sup> 在机器学习中，语言模型的经验标度律指出，交叉熵损失随模型规模、数据集规模和训练计算量呈幂律变化，其中一些趋势跨越七个以上的数量级，只有双对数轴才能紧凑地显示这一范围。<sup>[13](https://arxiv.org/abs/2001.08361)</sup>

**频率响应。** 控制工程中的伯德图（Bode plot）使用对数频率轴，幅值通常绘于对数刻度上，或转换为线性刻度上的分贝；渐近幅值段以分贝每数量级来规定，例如原点处极点对应 20 dB/数量级。<sup>[12](https://opentext.ku.edu/controlsystems/chapter/using-frequency-response-to-design-control-systems-bode-plots-nyquist-plots/)</sup>

## 拟合中的陷阱

看起来笔直的双对数图只是幂律的提示，而非证明，拟合方法至关重要。在一项对照测试中，从指数为 \( \gamma = 2.500 \) 的已知泽塔分布中抽取了10,000个样本，并应用了三种图形估计方法；对双对数图作完整线性拟合以及对对数分箱作拟合分别产生了36%和29%的偏差，而最大似然估计则准确和稳健得多。<sup>[7](https://arxiv.org/abs/cond-mat/0402322)</sup> 后来关于离散幂律分布的工作同样指出，弯曲的双对数图常被当作幂律来呈现，并提出了明确的标准来选择一个最小值，使幂律拟合在该值以上成立。<sup>[14](https://arxiv.org/abs/1209.1270)</sup> 计量学中一个相关的告诫是：取对数等代数变换会改变问题的统计结构，因此不确定度应随数据一同变换，而不能假定其不变。<sup>[15](https://www.bipm.org/documents/20126/2071204/JCGM_GUM_6_2020.pdf)</sup>

## 在软件中

现代绘图库用轴刻度取代了预先印制的格纸。Matplotlib 提供 `loglog` 作为快捷方式，等价于将两轴设为 'log' 刻度后再绘图；单独的 `semilogx` 和 `semilogy` 函数只对一根轴取对数，而底数、次刻度位置（`subs`）以及非正值处理都是可设置的参数。<sup>[2](https://matplotlib.org/stable/api/_as_gen/matplotlib.axes.Axes.loglog.html)</sup><sup> • </sup><sup>[16](https://venus.matplotlib.org/stable/users/explain/axes/axes_scales.html)</sup> 设置对数刻度还会安装一个 `LogLocator`，将刻度置于数量级间隔处，以及一个 `LogFormatter`，在数量级处使用科学记数法。<sup>[16](https://venus.matplotlib.org/stable/users/explain/axes/axes_scales.html)</sup>

## References

1. [C. V. Boys (1895). Scale Lines on the Logarithmic Chart. *Nature* 52, 272–274.](https://www.nature.com/articles/052272a0)
2. [matplotlib.axes.Axes.loglog, Matplotlib 3.11 documentation.](https://matplotlib.org/stable/api/_as_gen/matplotlib.axes.Axes.loglog.html)
3. [Statistical Principles: The use and abuse of logarithmic axes, GraphPad FAQ 1487.](https://www.graphpad.com/support/faqid/1487/)
4. [Why are negative values (and zero) missing from graphs using a logarithmic axis?, GraphPad FAQ 2056.](https://www.graphpad.com/support/faq/why-are-negative-values-and-zero-missing-from-graphs-using-a-logarithmic-axis/)
5. [Graphing with Logarithmic Paper Tutorial, Department of Physics, University of Guelph.](https://www.physics.uoguelph.ca/graphing-logarithmic-paper-tutorial)
6. [Sanjoy Mahajan (2014). The Art of Insight in Science and Engineering: Mastering Complexity, MIT OpenCourseWare.](https://ocw.mit.edu/courses/res-6-011-the-art-of-insight-in-science-and-engineering-mastering-complexity-fall-2014/3bca850386a3005c22134fa62fb3bad5_MITRES_6-011F14_art_insfin.pdf)
7. [Goldstein, M. L., Morris, S. A., Yen, G. G. (2004). Problems with Fitting to the Power-Law Distribution. arXiv:cond-mat/0402322.](https://arxiv.org/abs/cond-mat/0402322)
8. [Analyzing lognormal data: A nonmathematical practical guide, PMC.](https://pmc.ncbi.nlm.nih.gov/articles/PMC12163497/)
9. [Milestones in the History of Thematic Cartography, Statistical Graphics, and Data Visualization, datavis.ca.](https://www.datavis.ca/milestones/index.php/index.php?group=1850%2B&mid=ms125)
10. [The History of Grids, Archania.](https://archania.org/p/arch-history/thematic-histories/the-history-of-grids)
11. [NIST/SEMATECH e-Handbook of Statistical Methods, Section 8.2.2: How do you plot reliability data?](https://www.itl.nist.gov/div898/handbook/apr/section2/apr22.htm)
12. [Using Frequency Response to Design Control Systems: Bode plots & Nyquist Plots, University of Kansas open textbook.](https://opentext.ku.edu/controlsystems/chapter/using-frequency-response-to-design-control-systems-bode-plots-nyquist-plots/)
13. [Kaplan, J. et al. (2020). Scaling Laws for Neural Language Models. arXiv:2001.08361.](https://arxiv.org/abs/2001.08361)
14. [Corral, Á., Deluca, A., Ferrer-i-Cancho, R. (2012). A practical recipe to fit discrete power-law distributions. arXiv:1209.1270.](https://arxiv.org/abs/1209.1270)
15. [JCGM GUM-6:2020, Guide to the expression of uncertainty in measurement, Part 6, BIPM.](https://www.bipm.org/documents/20126/2071204/JCGM_GUM_6_2020.pdf)
16. [Axis scales, Matplotlib 3.11 documentation.](https://venus.matplotlib.org/stable/users/explain/axes/axes_scales.html)

---
*Initially written Sep 17, 2026 · Reviewed: Sep 30, 2026; Oct 15, 2026 · Edited: Sep 30, 2026; Oct 15, 2026; Oct 25, 2026 · Last review: Oct 15, 2026*

Topic: 物质世界与数学 › 测量与时间 › 计量学、仪器仪表与应用测量 › Measurement theory and uncertainty › Logarithmic scales and level quantities

Copyright 2026 Edgepedia

License: Edgepedia Community License 1.0, https://www.edgepedia.org/edgepedia/license

Source: https://www.edgepedia.org/zh/log-log-plot

English original: https://www.edgepedia.org/log-log-plot
