Lesson 7 of 20

Bar charts — the commonest chart, and the commonest mistake

Figs. 1B·1C·2C·2F·5D — 14 of the 62 panels

Bar charts — the commonest chart, and the commonest mistake
Bars look easy, but they need five decisions — order, direction, stacking, baseline, error bars.

The most-used chart in the paper: 14 of the 62 panels. And every time you draw one there are five things to decide.

DecisionDefault answer
Orderby value. Alphabetical order carries no meaning
Directionlong names → horizontal bars
Stackingonly when the total means something. Otherwise put them side by side
Baselinezero. No exceptions
Error barssay what they are — SD? SEM? 95% CI?
TIL infiltration across thirteen tumour types. Change the order, direction, stacking and baseline.
Loading…
On the right you see where LUAD sits at once. Same data, same kind of chart — only the order changed.
Python Runs in your browser

Stacked bars need particular care. Fig. 1B stacks the immune-inflamed and immune-desert proportions, which is legitimate: they sum to 100%.

But in a stacked bar the only segment a person can read accurately is the bottom one. Every other segment starts at a different height, so they cannot be compared.

Stack when
the total means something (100%) and the reader's target is the bottom segment
Do not stack when
middle segments must be compared across conditions. Then give each segment its own panel
Can you see the T cells (orange) increasing on the left? On the right you can, immediately — because the baselines now match.
Python Runs in your browser
🤔 Check yourself
Thirteen tumour means are drawn in alphabetical order. Why is that poor?
🤔 Check yourself
Which segment of a stacked bar can people compare accurately?