Data Science · Beginner level

Beginner level · Module 4: Visualisation and Data Storytelling · Lesson 2 of 3

Making Clear Charts in Python

Create charts with matplotlib and seaborn and make them readable with titles, labels and sensible design.

In this lesson you will

  • Create bar, line, histogram and scatter charts in Python
  • Add titles, axis labels, units and sources

Key concepts

matplotlibseaborntitles and labelscolour use

The lesson

matplotlib draws charts in Python, and seaborn builds on it with good defaults for statistical charts. Most charts need only a few lines.

Every chart needs a title that states the finding ('Kator has the longest walks to safe water'), labelled axes with units and a source note with the date and sample size.

Use colour to highlight, not decorate: grey for most bars and one colour for the group you are discussing. Check that the chart still works in black and white and for colour-blind readers.

Step by step

  1. Create a sorted bar chart of median walking time by district.
  2. Add a finding title, axis labels and a source note.
  3. Highlight the worst district with colour.
  4. Save the chart as a PNG for the brief.

Practice activity

Produce the three charts for the water brief.

Expected result: Three clear, labelled, honest charts saved for the brief.

Check your understanding

  1. What should a chart title say?

    Show answer

    The main finding.

  2. How should colour be used in an analytical chart?

    Show answer

    To highlight what matters, not for decoration.

Taught live by an instructor — online or in person. Free course lessons are for self-study and do not lead to a certificate — see registration options.