Lesson 7 of 20
Bar charts — the commonest chart, and the commonest mistake
Figs. 1B·1C·2C·2F·5D — 14 of the 62 panels
The most-used chart in the paper: 14 of the 62 panels. And every time you draw one there are five things to decide.
| Decision | Default answer |
|---|---|
| Order | by value. Alphabetical order carries no meaning |
| Direction | long names → horizontal bars |
| Stacking | only when the total means something. Otherwise put them side by side |
| Baseline | zero. No exceptions |
| Error bars | say what they are — SD? SEM? 95% CI? |
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?
Answer Ordering is information you get for free. Sort by value and the ranking, the maximum and the minimum are simply visible. Unless the chart is a lookup table, value order is the default.
🤔 Check yourself
Which segment of a stacked bar can people compare accurately?
Answer Only the bottom segment shares a common baseline. The others start at different heights, so comparing them means doing subtraction by eye — which people cannot do.