The most common visualization mistake is starting from the chart. "Let's make a pie" or "put it in a bar chart" puts the tool before the thought. Good chart choice runs the other way: start from what you want the reader to see.
Start With the Message, Not the Chart
Before choosing any chart, ask the question almost no one asks: do you even need a chart?
One or two numbers
Just show the number, big and clearly labeled. A chart of a single value is wasted ink.
Exact values to look up
Use a well-formatted table. Charts are for patterns, not precise read-off.
A pattern or comparison
Now a chart earns its place: shape, comparison, trend, or relationship.
Not "what chart should I make?" but "what do I want the reader to see?" Name that, and the chart almost picks itself.
The Chart Chooser: Purpose → Chart
Most charts serve one of five purposes. Name the purpose and you have narrowed hundreds of options to a handful. This is the spine of every chart-chooser (Abela, the FT Visual Vocabulary, the Data Visualization Catalog).
| Purpose | It answers | Go-to chart | From |
|---|---|---|---|
| Comparison / ranking | How do categories compare? What's the order? | Bar (sorted), dot/lollipop | Charts for Categorical Data |
| Composition | What are the parts of the whole? | Stacked / 100% bar, treemap, pie (≤5) | Charts for Categorical Data & Multivariate & Specialized Visuals |
| Distribution | How are values spread? Outliers? Shape? | Histogram, box, violin, density | Charts for Numerical Data |
| Relationship | Do variables move together? | Scatter, bubble, correlation heatmap | Charts for Numerical Data & Multivariate & Specialized Visuals |
| Trend over time | What's the trajectory? | Line chart, area, slope | Charts for Numerical Data |
Narrow by Data Type & Variable Count
Once you know the purpose, your data narrows the rest. Cross what kind of variables you have with how many:
| 1 variable | 2 variables | 3+ variables | |
|---|---|---|---|
| Categorical | Bar of counts | Grouped/stacked bar; heatmap of the cross-tab | Small multiples; treemap |
| Numerical | Histogram / box / density | Scatter (or line if x is ordered/time) | Bubble (size); color + facets |
| Cat + Numeric | Bar (a value per category) | Grouped bar; scatter colored by category | Encode with color, size, facet |
For three or more variables, add them by perceptual strength: position, then length, then color, then size (see Multivariate & Specialized Visuals). When one chart starts juggling color and size and shape at once, facet into small multiples instead, it keeps the strong position channel in every panel.
From Default to Explanatory
The same chart serves two very different jobs, and they call for different polish.
| Exploratory (for you) | Explanatory (for an audience) | |
|---|---|---|
| Goal | Find what's interesting | Communicate one specific thing |
| How many charts | Many, fast and rough | A few, polished |
| Messages | Many | One clear takeaway |
| Color | Defaults are fine | Sparing: color is the point |
The single highest-leverage habit in explanatory work: make the title state the conclusion. "Revenue grew 18% after the April relaunch" beats "Revenue by month." If you want the reader to reach a point, say it in words and let the chart prove it.
A quick checklist to take any default chart from rough to clear, pulling together the Charts for Categorical Data through Multivariate & Specialized Visuals chapters:
Right type, then declutter
Pick the chart for the purpose, then strip gridlines, borders, 3D, and chartjunk.
Focus attention
Gray the context, color the one thing that matters, sort intentionally.
Honest axes & labels
Bars start at zero, lines need not; direct-label over legends; colorblind-safe color.
Say the point
A takeaway title and, where useful, a short annotation on the key value.
The costly errors are about the wrong chart for the message: a pie used for ranking (use a bar), a line over unordered categories, dual axes that fake a correlation, 3D that distorts, or a busy chart where a number or table would be clearer. Truncating or cherry-picking the axis is the most consequential of all.
The same data can tell different stories depending on the chart. Your job is to choose the one that reveals the truth clearly to your audience. This is the hinge between exploratory analysis and communication, the skill that turns a finding into something other people can act on.
Choosing the Right Chart in Machine Learning & AI
The same discipline, match the chart to the question, governs a machine-learning workflow. Each stage has a diagnostic plot that is the standard answer, and reaching for the wrong one hides the problem you need to see.
| ML question | The right chart | What it shows |
|---|---|---|
| Is my classifier calibrated and accurate? | Confusion matrix and ROC curve | Where predictions go wrong, and the accuracy-versus-coverage trade-off |
| Is my model under- or over-fitting? | Learning curve (a line chart of score vs training size) | Whether more data would help, or the model is already saturated |
| Which features drive the model? | Feature-importance bar or a SHAP summary | The ranked drivers of the prediction, for trust and debugging |
Whether you are exploring a raw dataset or debugging a model, the decision is identical: what is the data type, and what is the question? A time axis wants a line, a category wants a bar, a distribution wants a histogram, and a model's errors want a confusion matrix. The framework transfers whole.
Real-World Example: One Dataset, Four Charts
The best way to practice chart choice is on a dataset with several column types. This year of daily coffee-shop metrics has exactly that: a date (a line for the sales trend), a day-of-week category (a bar for the weekend lift, about 254 drinks a weekend day versus 212 on weekdays), and a numeric ticket size (a histogram). The companion notebook draws the right chart for each.
One row per day: date (a time axis), day_of_week and
top_category (categorical), and drinks_sold and avg_ticket_usd (numeric).
The mix of types is the point, each column calls for a different chart.
Bring it to life in Python
The companion notebook shows one dataset rendered four ways, runs the chooser across four questions, demonstrates when a number or table beats a chart, and makes over a cluttered default into a clean explanatory chart with a takeaway title.
View opens the rendered notebook instantly (no setup). Open in Colab runs &
edits it live in your browser. To run locally, install numpy, pandas,
matplotlib and launch jupyter notebook.
🎓 Key Takeaways
- ✓Start from the message and the data, not the chart; first ask whether you need a chart at all.
- ✓Name the purpose (comparison, composition, distribution, relationship, trend) and it narrows the choice to a few charts.
- ✓Cross data type with variable count to land on the specific chart.
- ✓Exploratory is for you, explanatory is for an audience: the latter needs one takeaway and a conclusion-stating title.
- ✓Choice mistakes mislead: pie-for-ranking, line over categories, dual axes, 3D, or a chart where a number or table is clearer.
Practice Challenges
Five short challenges, beginner to intermediate. Try them on paper or in Python before checking the solutions.
Name the chart
For each, name the purpose and the best chart: (a) which of 6 stores sold most; (b) traffic over 24 months; (c) how customer ages are distributed; (d) whether study hours relate to exam scores.
Bar, not pie
Six teams have resolved-ticket counts. Draw the chart that lets a reader rank them at a glance, and say in one line why a pie would be worse.
Make it explanatory
Monthly defect rates have one bad month. Redraw a plain bar chart so it argues: highlight the problem month, gray the rest, and give it a takeaway title.
Exploratory or explanatory?
You are (a) scanning a new dataset for yourself and (b) presenting one finding to executives. How should the charts differ, and what makes a good explanatory title?
Maybe no chart
Pick number, table, or chart for each: (a) a single KPI of 4.6/5; (b) four exact quarterly revenue figures finance will read off; (c) the shape of 10,000 transaction amounts.
A fully-worked solutions notebook walks through all five challenges in the same visual style. Try them yourself first, then compare.
Quiz: Test Yourself
Eight quick questions on choosing a visualization. Answer them, hit Check Answers, and keep refining until you score 100%. Your progress is saved, so you can hop back to the chapter and return anytime.