Choosing how to encode a number
Start from the question, then choose the encoding people read most accurately.
You will be able to
- Rank visual encodings by how accurately people read them
- Choose a chart from the question you are asking
- Use the Charts gallery to find a chart by question
What are you asking?
ReadA chart answers a question. "How is this distributed?", "which group is bigger?", "how did it change?" and "are these related?" each lead to different charts.
The Charts page in the sidebar groups every recipe by the question it answers. Each recipe opens with that question at the top.
Which reads best?
PredictPredict first
You must compare values across five groups as exactly as possible. Which encoding do people read most accurately?
Reveal
The answer: Position along a common axis
Position along a common axis. Cleveland and McGill's experiments rank the encodings roughly as: position, then length, then angle and slope, then area, and last color. Their rank tells you what to use for the comparison that matters most.
The same numbers, twice
ExploreHere are a dot plot and a pie. Try to rank three similar slices from the pie, then compare with how fast you can rank the dots.
View data
| country | life_expectancy | sex |
|---|---|---|
| Japan | 83.300 | Male |
| Japan | 85.300 | Female |
| Japan | 82.600 | Male |
| Japan | 89.100 | Female |
| Japan | 81.200 | Male |
| Japan | 89.100 | Female |
| Japan | 83.500 | Male |
| Japan | 85.700 | Female |
| Japan | 79.900 | Male |
| Japan | 87.400 | Female |
| Japan | 83.800 | Male |
| Japan | 89.500 | Female |
| Japan | 80.600 | Male |
| Japan | 86.500 | Female |
| Japan | 84.200 | Male |
| Japan | 87.600 | Female |
| Japan | 82.100 | Male |
| Japan | 87.600 | Female |
| Japan | 82.800 | Male |
| Japan | 88.500 | Female |
| Japan | 83.800 | Male |
| Japan | 87.400 | Female |
| Japan | 83.400 | Male |
| Japan | 86.300 | Female |
| Japan | 81.900 | Male |
| Japan | 86.700 | Female |
| Japan | 80.800 | Male |
| Japan | 87.100 | Female |
| Japan | 81.500 | Male |
| Japan | 86.700 | Female |
| Japan | 81.100 | Male |
| Japan | 86 | Female |
| Japan | 83.900 | Male |
| Japan | 87.900 | Female |
| Japan | 81.300 | Male |
| Japan | 87.200 | Female |
| Japan | 81.300 | Male |
| Japan | 85.200 | Female |
| Japan | 85.100 | Male |
| Japan | 85.500 | Female |
| Spain | 78 | Male |
| Spain | 86.200 | Female |
| Spain | 80.800 | Male |
| Spain | 86.400 | Female |
| Spain | 81.100 | Male |
| Spain | 85.200 | Female |
| Spain | 82 | Male |
| Spain | 85.500 | Female |
| Spain | 80.700 | Male |
| Spain | 86.700 | Female |
| Spain | 83 | Male |
| Spain | 86.700 | Female |
| Spain | 77.900 | Male |
| Spain | 85.800 | Female |
| Spain | 82.300 | Male |
| Spain | 85.700 | Female |
| Spain | 81.100 | Male |
| Spain | 89.200 | Female |
| Spain | 81.800 | Male |
| Spain | 87.400 | Female |
First 60 of 480 rows.
View data
| browser |
|---|
| Safari |
| Firefox |
| Safari |
| Chrome |
| Chrome |
| Chrome |
| Safari |
| Opera |
| Chrome |
| Safari |
| Samsung Internet |
| Firefox |
| Safari |
| Chrome |
| Chrome |
| Chrome |
| Edge |
| Safari |
| Chrome |
| Edge |
| Firefox |
| Chrome |
| Firefox |
| Chrome |
| Safari |
| Safari |
| Edge |
| Chrome |
| Firefox |
| Chrome |
| Firefox |
| Chrome |
| Chrome |
| Chrome |
| Safari |
| Edge |
| Opera |
| Edge |
| Safari |
| Firefox |
| Safari |
| Samsung Internet |
| Chrome |
| Opera |
| Edge |
| Firefox |
| Chrome |
| Chrome |
| Chrome |
| Safari |
| Chrome |
| Chrome |
| Safari |
| Safari |
| Chrome |
| Chrome |
| Chrome |
| Chrome |
| Safari |
| Chrome |
First 60 of 2000 rows.
Open each in Charts, and use Compare to see two charts side by side on the same page.
A rule of thumb
ReadGive your main comparison the best channel available:
- Position for the thing you want read exactly.
- Length for totals from a common baseline.
- Color for groups, not for precise amounts.
- Size only for rough magnitude.
Sometimes a table wins
ReflectA chart shows patterns. A table gives exact values. If your reader needs to look up individual numbers, use a table, or add a small table underneath.
Think of the last chart you made. What did you want the reader to compare? Was that comparison on a common axis?
Check your understanding
CheckpointCheck yourself
You want readers to compare the market share of eight brands precisely. Which chart should you use?
Show the answer
Answer: a
Eight angles or bubble sizes are hard to rank. A common axis turns the comparison into reading positions.
Check yourself
What is color best used for in a chart?
Show the answer
Answer: b
People read amounts from color poorly. Color is good at telling things apart and drawing attention.
Recap
Recap- Start from the question, not from a chart type.
- Put the comparison that matters on a common axis.
- Use color for identity and size for rough magnitude, and don't be afraid of a table.
Concepts in this lesson