Labels and Honesty

A chart without units is a decoration, and a cut axis is an argument.

The label is part of the answer

A number on a chart with no unit and no period cannot be acted on. Title, axis labels and the source belong to the chart as much as the bars do.

import pandas as pd

# df.plot(kind="bar", title="Mean score by team, autumn term")
print("Mean score by team, autumn term (n=42)")

A truncated axis exaggerates

Starting a bar chart's value axis somewhere other than zero makes a small difference look enormous. Sometimes that is the honest choice for a line; for bars it almost never is.

import pandas as pd

scores = pd.Series([98.0, 99.0])
print((scores.max() - scores.min()).round(2))
print(((scores.max() - scores.min()) / scores.max() * 100).round(2))

Exercise

Try It Yourself

Write headline(df) that returns a sentence of the form "red leads on 85.0, 15.0 ahead of blue", using the highest and lowest mean score per team.

Press Run to see output

Check Your Understanding