Graphing data
3 min read
Core idea
A chart turns numbers into spatial relationships the visual cortex can read at a glance. Each of the seven core chart types is shaped by one structural decision: are the categories discrete (separate boxes) or continuous (positions on a number line)? Are you showing a single variable or a paired relationship? Once you can name those properties for your data, the chart picks itself.
Why it matters
A well-chosen chart compresses hundreds of numbers into a single perception — "ah, women's wing lengths are wider-spread than men's" — that no table can convey. A badly chosen chart smuggles in false implications: a pie chart of running times implies the sum-of-times is meaningful (it isn't), a touching-bar bar chart implies the categories are on a number line (they aren't). Charting is not decoration; it is the first analytical step.
Mental model
The chart-type decision tree
The chart-selection problem branches on three questions: what kind of data, how many variables, and what's the goal?
The bar-chart vs histogram distinction
This single distinction trips up more readers than any other. Both have rectangular bars. They are not the same chart.
Practical application
When sketching a chart for the first time, walk through this short procedure.
-
Name your variables. Single or paired? Discrete (categories or counts) or continuous (measurements)?
-
State your goal. Describe a shape? Compare two batches? Reveal a relationship? Track over time?
-
Pick the chart family from the decision tree above. If your data is discrete + describing → bar chart or pie chart. Continuous + describing → histogram or stemplot. Paired non-time → scatter. Paired time → time graph.
-
Order categories sensibly. For bar charts of unordered categories, sort by frequency (tallest left) — this surfaces the pattern without forcing the viewer to scan.
-
Choose the orientation. Long category names → horizontal bars. Quantitative labels → vertical (column) bars.
-
Decide whether values fit on or off the bars. Pie charts need percentages on every slice. Histograms need a vertical axis showing frequency or frequency density. Bar charts can usually let the height speak for itself.
Example
You run a small coffee shop and track the following over a calendar year:
- Total daily revenue for every weekday of the year (paired with the date, in order). → Time graph. Time on horizontal axis, revenue on vertical, dots joined.
- Number of cups sold by drink type (espresso, latte, mocha, drip, cold brew). → Bar chart. Discrete categories, gaps between bars, sorted by count.
- Distribution of customer ages in 5-year bins from 18 to 78. → Histogram. Continuous data (age), bars touching, equal class intervals.
- Tip percentages paired with bill totals across 500 transactions. → Scatter graph. Two continuous variables, you want to see whether bigger bills get bigger tips proportionally.
- Composition of revenue across the four main drink types this month versus the same month last year. → Component (stacked) bar chart. Each bar is a month total split into shaded slices for each drink type, allowing you to compare both totals and mixes.
The same shop produces five fundamentally different chart shapes from five fundamentally different data questions. The chart is not just a visualisation — it is a commitment to a kind of question.
Related lessons
Related concepts
- Data Visualizationlinked concept
- Histogramlinked concept
- Bar Chartlinked concept
- Pie Chartlinked concept
- Distributionslinked concept