Data Visualization
Principles of honest and effective data visualization — choosing the right chart, avoiding common pitfalls, and reading visualizations critically.
For the complete documentation index, see llms.txt.Skip to main content
Different data relationships call for different visual forms. Bar charts compare quantities across categories. Line charts show change over time. Scatter plots reveal relationships between two variables. Pie charts show parts of a whole (but only when there are few categories).
Common mistakes include using pie charts with too many slices (human eyes struggle to compare similar-sized wedges), using 3D effects that distort proportions, and using area-based charts (bubble charts) without noting that humans perceive area non-linearly — doubling the radius of a circle quadruples its area.
The right chart makes the intended comparison effortless; the wrong one hides it. The choice follows from the relationship you want the reader to see:
| What you want to show | Best chart | Why |
|---|---|---|
| A trend over time | Line chart | Position and slope encode change clearly |
| Comparing categories | Bar chart | Length is the most accurate visual cue |
| Parts of a whole (few parts) | Stacked bar or single pie | Shows composition; keep to a handful of slices |
| Relationship between two variables | Scatter plot | Reveals correlation, clusters, outliers |
| Distribution of one variable | Histogram | Shows shape, spread, and skew |
Consider budget shares across six departments. A pie chart with six slices forces the eye to compare angles, and humans judge angles poorly: slices of 18% and 21% look nearly identical. Redraw the same six numbers as a horizontal bar chart sorted from largest to smallest and the ranking becomes instantly readable, because we compare lengths far more accurately than areas or angles. As a rule, pies are defensible only for two or three parts; beyond that, use bars.
Edward Tufte's guidance is to maximise the share of ink that represents actual data and erase the rest. Drop shadows, heavy gridlines, 3-D effects, and decorative backgrounds add no information and often distort perception — a 3-D pie exaggerates whichever slice sits at the front. Before publishing a chart, ask of every visual element: does this help the reader understand the data, or is it decoration? If it is decoration, delete it. A clean chart is not merely prettier; it is more honest, because there is less room to mislead.
Colour is data, not decoration, so use it deliberately. A sequential palette (light to dark) suits ordered quantities; a diverging palette suits data with a meaningful midpoint like zero or an average; and distinct hues suit unordered categories. Never encode your only signal in red-versus-green, because roughly one in twelve men cannot distinguish them — add shape, labels, or brightness as a backup. Keep the palette limited: more than about seven colours and readers can no longer match legend to chart. A restrained, purposeful use of colour makes a chart both clearer and fairer to every reader.