Programming · free software · the open webSubscribe via RSS

What Is a Sensible Way to Plot Noisy Sensor Data?

From the earlier reference collection. Read the current software blog.

Show observations clearly and disclose any smoothing so a cleaner line does not hide variation or missing data.

Keep raw observations visible

Sensor data can vary from one sample to the next because conditions change, instruments have limits, or readings contain noise. A plot should preserve the observed points in some visible form. A line that hides individual samples can make the data appear smoother or more continuous than they are.

For a short series, draw each observation as a point and connect them only if the connection is useful and does not imply measurements between samples. For dense data, use a display that still communicates sampling and gaps. Always keep timestamps available so a reader can inspect what contributes to a visible pattern.

Describe any smoothing

Smoothing can help reveal a broad trend, but it changes the displayed series. If a chart includes a moving average, name the window and explain how it is calculated. A five-sample rolling mean differs from a five-minute time window when samples are irregular, so specify whether the window counts observations or elapsed time.

For example, plot raw points in a light color and a 30-minute rolling average as a separate line. Include a legend and explain how the first points are handled when the full window is not yet available. Do not call the smoothed series a sensor reading; it is a derived summary.

Preserve gaps and scale

A missing interval should remain apparent. Connecting points across a long gap can imply that the sensor tracked a gradual change when no observations were recorded. Break the line at a defined gap threshold or otherwise mark the interruption, and document that choice.

Choose axis limits that show variation without exaggerating it. A narrow vertical range can make tiny changes look dramatic; a very broad range can conceal useful structure. Include units and a clear time axis. If values are rounded or transformed before plotting, mention that so the visual matches the underlying data’s meaning.

Make interpretation repeatable

A caption can state the station, unit, time zone, observation interval, and any aggregation or filtering. If quality flags exclude points, identify the rule and make the raw data available when appropriate. Readers should be able to distinguish source measurements from calculated lines and understand why a point is absent.

A useful plot balances readability with traceability. Keep the raw observations as the reference, use smoothing only to answer a clear question, and disclose its calculation. That way a cleaner visual does not obscure short-lived peaks, irregular sampling, or the uncertainty created by data gaps.

Suggest a correction · All posts