Skip to content
Plot templates

Teaching Case — What a Log Axis Does With a Zero

A series containing a genuine zero plotted on a logarithmic axis, so the engine's sentence about it is visible next to the figure. Every plotting tool drops zero and negative values from a log axis; almost none says so, and the result is a series with a hole in it that a reader interprets as a series with no data there.

Template previewPlot
Contaminant concentration by sampling site1 series (scatter). x from 1 to 6 — Site. y from 8 to 210 — Concentration. Series: Measured.Contaminant concentration by sampling siteDeliberately on a log axis with a zero in the data — see the note · 1 series · 6 pointsMeasured: 1, 120Measured: 2, 45Measured: 3, 8Measured: 5, 31Measured: 6, 210123456Site10100Concentration (µg/L)The y axis is logarithmic and 1 value is zero or negative, so it is absent from the figure rather than at the bottom of it.Site 4 measured zero — below the limit of detection. It is not at the bottom of this figure; it is not ON this figure at all, because a logarithmic axis has no position for zero.The engine says so in the strip below rather than letting the gap read as a missing sample. For data like this use a symlog axis, or plot the detection limit and mark thepoint as censored.

Make it your own.

title: Contaminant concentration by sampling site
subtitle: Deliberately on a log axis with a zero in the data — see the note
x: Site
y: Concentration (µg/L)
y scale: log
grid: y

scatter "Measured"
  1  120
  2   45
  3    8
  4    0
  5   31
  6  210

note: Site 4 measured zero — below the limit of detection. It is not at the bottom of this figure; it is not ON this figure at all, because a logarithmic axis has no position for zero. The engine says so in the strip below rather than letting the gap read as a missing sample. For data like this use a symlog axis, or plot the detection limit and mark the point as censored.