3.7 Visualization that communicates

Standard data-visualisation practice — written August 2026

What this is and why it exists

A chart has one job: to put one point into somebody's head in about five seconds, correctly. That is a communication problem with a technical component, and most charts fail at the communication half — they are drawn to display data rather than to make a point, and the reader is left to find one. This topic is the judgement layer: what to draw, how to make it readable, and the four ways a chart made in good faith can still tell a lie.

The vocabulary

  • Figure — the whole canvas, which may hold several plots.
  • Axes — one plot within it, with its own x and y axis; this is the object most code should be talking to.
  • Explicit interface — creating the figure and axes objects and calling methods on them.
  • Implicit interface — the state-machine style where each call acts on whichever plot is "current".
  • Encoding — the visual property carrying a value: position, length, angle, area, colour.
  • Annotation — text on the chart that states the point.
  • Sequential and diverging colour — a scale running one way from low to high, or outward from a meaningful middle.
  • Truncated axis — one that does not start at zero, exaggerating differences.

The mental model

Hold two levels. A figure is the canvas; an axes is one plot on it. Nearly all confusion in matplotlib code comes from mixing the explicit style — where you obtain the figure and axes and call methods on them — with the implicit style, where calls act on whichever plot is current. The explicit style is worth adopting as a habit for one plain reason: as soon as a figure has two plots, "the current one" stops being obvious to the reader and eventually to the author. The specific function names and arguments belong to the library's own reference, which is under Go deeper — this lesson deliberately does not paraphrase an API it cannot quote, and the reference is the right place to read one anyway.

The judgement layer is where the value is, and it starts with encoding. People read position most accurately, then length, then angle and area, and colour least accurately of all. That ranking decides almost every chart choice you will make. Comparing values across categories: a bar chart, because bars are lengths from a common baseline. A value over time: a line, because position along an axis is what continuity looks like. Two numeric variables together: a scatter, position twice. Distributions: a histogram, and a box plot when you must compare many of them at once. And the pie chart sits at the bottom of the ranking, encoding by angle and area, which is why it defeats people at exactly the job it is used for — comparing similar-sized slices.

Colour has three rules that cover most cases. A quantity gets a sequential scale, running one way from low to high; something with a meaningful middle — profit and loss, above and below average — gets a diverging one, centred there. Categories get distinct hues, and no more than about seven, because after that nobody can hold the legend in their head. And never use a rainbow scale for a quantity: it has no perceptual order, so readers see boundaries where the data has none, and it disappears entirely for a substantial minority of readers with colour-vision differences. Test the same figure in grey and see whether it still works — if it does, colour is decoration rather than the only carrier of meaning, which is where you want it.

Annotation is the step that turns a display into a statement. The title should state the finding rather than name the variables: "Southern-region scores are eight points higher" rather than "Score by region". Label the axes with units. Mark the one point you want noticed. A reader who takes the intended meaning in five seconds is the whole objective, and a bare chart with a descriptive title makes them do the work instead.

Then the four ways to lie by accident, which is this topic's real content because everybody does at least one of them.

A truncated axis. Starting a bar chart's axis at 90 rather than 0 turns a two-percent difference into a visual doubling. Bars encode length from zero and must start there. A line chart may reasonably zoom, because it encodes change rather than magnitude — but say so on the axis.

Dual axes. Two series on two different scales in one frame lets the author slide one against the other until they appear to move together, and the apparent correlation is a choice of scaling. Use two stacked plots sharing a time axis instead.

Unscaled areas. Doubling a value should double the encoded quantity. Doubling the radius of a circle quadruples its area, so a bubble chart drawn on radius overstates by a lot.

Counts where rates belong. A map of raw counts is a population map wearing a disguise: the biggest cities top every list of anything. Divide by the population and the map often reverses.

What you should now be able to explain or do

Say what a figure and an axes are and why the explicit style survives a second plot. Rank the visual encodings by how accurately people read them, and choose a chart from that ranking for four described questions. Apply the three colour rules and check a figure in grey. Write a title that states a finding rather than naming variables. Name the four accidental lies and say which chart types are vulnerable to each.

Check yourself

Because people read position most accurately, then length, then angle and area, and colour least. Choosing the chart is choosing which encoding carries the comparison you want made, so the most important comparison should sit on the most accurate encoding.

Because a bar encodes magnitude as length from a baseline, so a truncated axis directly misstates the ratio. A line encodes change, so a zoomed range can be legitimate — as long as the axis says so.

The apparent relationship is a choice of scaling — slide either axis and the curves can be made to agree or disagree. Two stacked plots sharing a time axis makes the same comparison without inviting the conclusion.

It has no perceptual order, so readers see boundaries the data does not contain, and it fails outright for readers with colour-vision differences. A sequential scale carries magnitude; a diverging one carries distance from a meaningful middle.

A population map. Counts follow population, so the comparison you meant is almost always a rate — divide by the population and the picture frequently reverses.

Go deeper

Back to Visualization that communicates: work through the checklist