Sub topic 5
What a Pareto Chart Contains
Assume you already understand basic percentages, cumulative sums, and ordinary bar charts. You should also be able to group events into categories and read a chart with one vertical axis. This chapter focuses on the parts of a Pareto chart and how those parts work together.
A Pareto chart combines two displays:
- Bars rank categories from largest to smallest.
- A line shows the cumulative percentage contributed by those categories.
The bars answer, “How large is each category?” The line answers, “How much of the total is covered so far?”
The main parts
A typical Pareto chart contains these elements:
| Part | Purpose |
|---|---|
| Categories on the horizontal axis | Names the causes, defects, or event types |
| Bars | Shows the count, cost, time, or another measure for each category |
| Left vertical axis | Gives the scale for the bars |
| Cumulative-percentage line | Shows the running share of the total |
| Right vertical axis | Gives the percentage scale, usually 0% to 100% |
| Optional reference line | Marks a target such as 80% |
| Title and scope | States what was measured and during which period |
The bars should normally descend from left to right. This ordering makes the largest contributors easy to find and makes the cumulative line rise quickly when a small number of categories account for much of the total.
The category labels belong on the horizontal axis. They should describe mutually exclusive categories when possible. If one event can be counted in several categories, the bar heights may double-count the same event.
The left vertical axis measures the bars. It might be labeled Defect count, Repair cost, Minutes delayed, or Customer complaints. The unit matters because a chart about counts can lead to a different decision from a chart about cost.
The cumulative line uses a second vertical axis. Its first point equals the first bar divided by the total. Each later point adds another bar's share. The final point should reach 100%, apart from rounding.
Why two vertical axes are used
The bars and line use different units. A bar might represent 42 defects, while the line represents 42% of all defects. Putting both on one scale would make one display difficult to interpret.
The left axis should match the bar measure. The right axis should be fixed from 0% to 100%. A fixed percentage scale makes charts easier to compare. If the right axis is stretched or truncated, the line can appear to show a larger or smaller effect than it really does.
A horizontal reference line at 80% is common. It is a visual aid, not a rule. The category where the cumulative line first reaches or passes that line identifies the categories needed to cover about 80% of the measured total.
Reading the visual structure
Start with the bars. Find the tallest bar and read its category and value. Then compare the next bars. This identifies the largest individual contributors.
Next, follow the cumulative line from left to right. The line shows the combined contribution of all categories up to each position. For example, if the third point is 80%, the first three categories together account for 80% of the total.
Do not read the line as the percentage for one category. The percentage for a single category comes from its bar divided by the total. The line is cumulative, so each point includes the categories before it.
A chart may include an Other category. This category combines small or uncommon causes. Place it last rather than sorting it by its raw value. Otherwise, the catch-all group can hide the individual causes that improvement work could address.
A minimal implementation
The following code creates the two-axis structure. The data are already sorted, so the chart anatomy is easy to inspect.
import matplotlib.pyplot as plt
from matplotlib.ticker import PercentFormatter
categories = ["Scratches", "Misalignment", "Wrong label", "Cracks", "Other"]
counts = [42, 27, 11, 8, 12]
total = sum(counts)
cumulative = []
running_total = 0
for count in counts:
running_total += count
cumulative.append(running_total / total * 100)
fig, bars_axis = plt.subplots(figsize=(8, 4.5))
bars_axis.bar(categories, counts, color="steelblue")
bars_axis.set_ylabel("Defect count")
bars_axis.tick_params(axis="x", rotation=30)
line_axis = bars_axis.twinx()
line_axis.plot(categories, cumulative, color="darkorange", marker="o")
line_axis.set_ylim(0, 100)
line_axis.set_ylabel("Cumulative percentage")
line_axis.yaxis.set_major_formatter(PercentFormatter())
line_axis.axhline(80, color="gray", linestyle="--")
bars_axis.set_title("Defects by category")
fig.tight_layout()
plt.show()The code uses twinx() to create a separate right-hand axis. The bars use the left axis, while the cumulative line uses the right axis. The set_ylim(0, 100) call prevents the percentage scale from exaggerating the line's movement.
Exercise
What does the third point on a Pareto chart's cumulative line represent?
Show answer
It represents the combined percentage of the total contributed by the first three categories, in their displayed order.