{
  "id": "log-log-plot",
  "title": "Log–Log Plot",
  "lang": "en",
  "source_lang": "en",
  "summary": "A log–log plot uses logarithmic scales on both axes to display multiplicative relationships and reveal power-law behavior across wide ranges of values.",
  "category": "mathematics",
  "subcategory": "probability-statistics",
  "type": "concept",
  "aliases": [
    "Double-logarithmic plot",
    "double-log plot",
    "log–log graph"
  ],
  "generated_at": "2026-11-05",
  "model": "pro/gpt-6.1-sol",
  "url": "https://aiwiki.page/en/log-log-plot/",
  "translations": {
    "zh-Hans": {
      "url": "https://aiwiki.page/zh/log-log-plot/",
      "json": "https://aiwiki.page/zh/log-log-plot.json"
    }
  },
  "sections": [
    {
      "heading": "",
      "text": "A log–log plot is a graph in which both coordinate axes use a logarithmic scale. Equal distances along either axis represent equal ratios rather than equal differences. This makes the plot useful for displaying quantities that span many orders of magnitude and for examining power-law relationships: a function of the form \\(y=Ax^k\\), with \\(A>0\\) and \\(x>0\\), appears as a straight line whose slope is \\(k\\), provided the same logarithm base is used on both axes."
    },
    {
      "heading": "Coordinates and interpretation",
      "text": "A log–log plot represents positive data pairs \\((x,y)\\) using transformed coordinates\n\n\\[X=\\log_b x,\\qquad Y=\\log_b y,\\]\n\nwhere the base \\(b\\) is greater than 1. Common choices are base 10 and the base of the natural logarithm, \\(e\\). Plotting software usually labels the axes with the original values, such as \\(1,10,100,1000\\), rather than their logarithms.\n\nFor base-10 axes, the interval from \\(1\\) to \\(10\\) has the same length as the interval from \\(10\\) to \\(100\\). Each is a decade, representing a factor of ten. Within a decade, the labels \\(2,3,\\ldots,9\\) are not equally spaced because their positions are proportional to their logarithms.\n\nThe point halfway between positive values \\(a\\) and \\(b\\) on a logarithmic axis corresponds to their geometric mean,\n\n\\[\\sqrt{ab},\\]\n\nnot their arithmetic mean. Thus, the midpoint between \\(1\\) and \\(100\\) is \\(10\\), not \\(50.5\\).\n\nUsing logarithmic axes is mathematically equivalent to plotting the logarithms on ordinary linear axes, but the labeling differs. An axis labeled “\\(x\\)” with logarithmic tick spacing displays original values; an axis labeled “\\(\\log_{10}x\\)” with linear spacing displays transformed values."
    },
    {
      "heading": "Power laws and straight lines",
      "text": "For the power law\n\n\\[y=Ax^k,\\]\n\ntaking logarithms gives\n\n\\[\\log_b y=\\log_b A+k\\log_b x.\\]\n\nIn transformed coordinates, this is\n\n\\[Y=c+kX,\\qquad c=\\log_b A.\\]\n\nThe exponent \\(k\\) is therefore the slope, while \\(A=b^c\\) determines the vertical position. Increasing \\(A\\) shifts the line upward without changing its slope.\n\nFor two points on an exact power law,\n\n\\[k= \\frac{\\log_b y_2-\\log_b y_1} {\\log_b x_2-\\log_b x_1} = \\frac{\\ln(y_2/y_1)} {\\ln(x_2/x_1)}.\\]\n\nThis ratio is independent of the common logarithm base.\n\nExamples include:\n\nRelationship | Log–log slope | Interpretation\n\\(y=Ax\\) | \\(1\\) | Doubling \\(x\\) doubles \\(y\\)\n\\(y=Ax^2\\) | \\(2\\) | Doubling \\(x\\) multiplies \\(y\\) by four\n\\(y=Ax^{-1}\\) | \\(-1\\) | Doubling \\(x\\) halves \\(y\\)\n\\(y=A\\) | \\(0\\) | \\(y\\) remains constant\n\nFor example, the points \\((1,3)\\), \\((10,300)\\), and \\((100,30000)\\) lie on \\(y=3x^2\\). On a log–log plot, each tenfold increase in \\(x\\) corresponds to a hundredfold increase in \\(y\\), producing a line of slope 2.\n\nThe slope is a ratio of changes in transformed coordinates, not simply the line’s apparent angle on a page. Changing the graph’s aspect ratio changes its visual angle without changing the exponent. If different logarithm bases are used on the two axes, the coordinate slope also requires a base-conversion factor.\n\nUnits and reference quantities\n\nFor physical quantities, logarithms can be expressed in terms of dimensionless ratios:\n\n\\[X=\\ln\\left(\\frac{x}{x_0}\\right),\\qquad Y=\\ln\\left(\\frac{y}{y_0}\\right),\\]\n\nwhere \\(x_0\\) and \\(y_0\\) are positive reference quantities with the appropriate units. A power law then becomes\n\n\\[Y= \\ln\\left(\\frac{Ax_0^k}{y_0}\\right)+kX.\\]\n\nChanging units or reference values shifts the coordinates but leaves the exponent unchanged. The numerical coefficient \\(A\\), however, generally depends on the chosen units."
    },
    {
      "heading": "Curvature and local scaling",
      "text": "A curved log–log graph indicates that a single power-law exponent does not describe the entire plotted range. For a positive differentiable function \\(y=f(x)\\), its local logarithmic slope is\n\n\\[\\frac{d\\ln y}{d\\ln x} = \\frac{x}{y}\\frac{dy}{dx}.\\]\n\nThis follows from the chain rule. It measures the approximate percentage change in \\(y\\) associated with a small percentage change in \\(x\\), and is also called an elasticity in econometrics.\n\nFor an exact power law, this slope is constant. For a sum of powers, it can vary. For example,\n\n\\[y=Ax^p+Bx^q,\\qquad A,B>0,\\quad p<q,\\]\n\napproaches slope \\(p\\) as \\(x\\) approaches zero and slope \\(q\\) as \\(x\\) becomes large. The graph shows a transition between two scaling regimes.\n\nAn additive offset can also create curvature. The relationship\n\n\\[y=c+Ax^k\\]\n\ndoes not generally form a straight line on log–log axes, even though one term is a power law. Estimating an exponent without accounting for a baseline can therefore be misleading."
    },
    {
      "heading": "Comparison with other plots",
      "text": "A semi-log plot has only one logarithmic axis. Different coordinate choices linearize different relationships:\n\n- Linear axes: \\(y=a+bx\\) is a straight line.\n- Logarithmic vertical axis, linear horizontal axis: the exponential relationship \\(y=Ae^{kx}\\) is a straight line.\n- Linear vertical axis, logarithmic horizontal axis: \\(y=a+b\\ln x\\) is a straight line.\n- Logarithmic axes on both coordinates: \\(y=Ax^k\\) is a straight line.\n\nExponential growth is not straight on a log–log plot. For \\(y=Ae^{kx}\\),\n\n\\[\\frac{d\\ln y}{d\\ln x}=kx,\\]\n\nso its local slope changes with \\(x\\).\n\nLog–log axes emphasize ratios and relative changes. Linear axes emphasize absolute differences. Neither representation is universally preferable; each highlights different properties of the data."
    },
    {
      "heading": "Applications",
      "text": "Log–log plots are widely used to compare measurements, theoretical predictions, and computational results across large ranges.\n\nIn physics, they display scaling relationships such as inverse-square laws and power-law dependence between physical quantities. A predicted exponent can be compared with the observed slope.\n\nIn numerical analysis, an error model\n\n\\[E(h)\\approx Ch^p\\]\n\nproduces an approximately straight line when error \\(E\\) is plotted against step size \\(h\\). Its slope estimates the convergence order \\(p\\). At very small step sizes, rounding effects associated with floating-point arithmetic can disrupt this trend.\n\nIn computer science, log–log plots can help compare measured runtime or memory use with power-law growth. An approximately straight segment does not by itself establish an asymptotic complexity bound: finite-size effects and logarithmic factors may alter the apparent slope.\n\nIn the study of fractals, counts or measures are often plotted against observation scale. For example, a box count satisfying \\(N(\\varepsilon)\\propto\\varepsilon^{-D}\\) gives slope \\(-D\\) when plotted against box size \\(\\varepsilon\\).\n\nIn statistics, log–log plots are used to inspect the tails of distributions and possible scaling relationships between variables."
    },
    {
      "heading": "Regression and statistical interpretation",
      "text": "A straight-looking pattern can motivate a power-law model, but it does not establish one. A common fitting procedure transforms the observations and applies linear regression:\n\n\\[\\ln y_i=\\alpha+k\\ln x_i+\\varepsilon_i.\\]\n\nUsing ordinary least squares minimizes squared residuals in logarithmic coordinates. It does not minimize squared deviations in the original values of \\(y\\).\n\nThis distinction corresponds to different error models. Additive errors in logarithmic coordinates imply multiplicative errors in the original coordinates:\n\n\\[y_i=e^\\alpha x_i^k e^{\\varepsilon_i}.\\]\n\nIf \\(\\varepsilon_i\\) has a zero-mean normal distribution with constant variance \\(\\sigma^2\\), the conditional median is\n\n\\[\\operatorname{median}(y\\mid x)=e^\\alpha x^k,\\]\n\nwhereas the conditional mean is\n\n\\[\\operatorname{E}(y\\mid x)=e^\\alpha x^k e^{\\sigma^2/2}.\\]\n\nSimply exponentiating a fitted logarithmic prediction therefore does not generally estimate the original-scale conditional mean.\n\nAppropriate fitting also depends on measurement errors, dependence between observations, and whether variability changes with \\(x\\). Uncertainty in both coordinates may require methods beyond ordinary regression.\n\nDistribution tails\n\nA straight tail on log–log axes is suggestive of a power law, but visual inspection alone is weak evidence. Other distributions can resemble straight lines over limited ranges, and histogram binning can change the apparent pattern.\n\nThe quantity being plotted also matters. If a continuous probability density satisfies\n\n\\[p(x)\\propto x^{-\\alpha},\\qquad \\alpha>1,\\]\n\nabove a lower threshold, its survival probability satisfies\n\n\\[P(X>x)\\propto x^{-(\\alpha-1)}.\\]\n\nThus, the density has log–log slope \\(-\\alpha\\), while the survival curve has slope \\(1-\\alpha\\). Confusing the two produces an exponent error of one.\n\nWith logarithmically spaced histogram bins, raw counts also reflect the increasing bin widths. Estimating a density requires normalization by bin width. Formal assessment of a power-law tail may involve maximum likelihood estimation, goodness-of-fit testing, and comparison with alternative distributions."
    },
    {
      "heading": "Limitations and presentation",
      "text": "Ordinary real-valued logarithmic axes require strictly positive coordinates. Zero has no finite logarithm, and negative values cannot be shown on a standard log–log plot. Omitting such observations can alter the interpretation of the displayed data.\n\nAdding an arbitrary constant before taking logarithms is not a neutral remedy. Plotting \\(\\ln(x+c)\\) changes ratios and can change an apparent scaling relationship. Signed logarithmic or symmetric-logarithmic scales can display nonpositive values, but do not preserve the standard power-law straight-line interpretation throughout their range.\n\nOther important limitations include:\n\n- Compression of absolute differences. Large numerical differences may appear visually modest.\n- Limited scaling ranges. Many smooth relationships look approximately straight over a narrow interval.\n- Sensitivity of local slopes to noise. Numerical estimates of derivatives can fluctuate strongly.\n- Transformed uncertainty. Symmetric error bars on the original scale generally become asymmetric in logarithmic coordinates; bounds reaching zero cannot be displayed normally.\n- Loss of context through cropping. Showing only an apparently linear segment can conceal thresholds, saturation, or changes in regime.\n\nClear presentation identifies the axis scales, units, plotted quantity, fitted range, and meaning of any reference slope. Tick labels should make clear whether they denote original values or logarithms."
    }
  ],
  "links": [
    "power-law",
    "natural-logarithm",
    "logarithm",
    "mathematical-function",
    "chain-rule",
    "econometrics",
    "exponential-function",
    "physics",
    "numerical-analysis",
    "floating-point-arithmetic",
    "computer-science",
    "fractal",
    "statistics",
    "linear-regression",
    "ordinary-least-squares",
    "normal-distribution",
    "expected-value",
    "probability-density-function",
    "maximum-likelihood-estimation"
  ],
  "sources": [],
  "license": "https://creativecommons.org/licenses/by/4.0/"
}