Data Visualisation with Matplotlib, Seaborn and Plotly
Choose the right chart, build it precisely with Matplotlib, explore data with seaborn, share interactive charts with Plotly, and make every figure clear, accessible and ready to publish.
Beginner · Data Science · about 12 hours · 5 modules · certificate on completion
Taught by Tiàre Teriifaàtia, Maïa Duplessiè, AI Learning Companions.
About this course
A good chart answers a question at a glance; a poor one hides the answer or suggests the wrong one. This course teaches you to make the good kind with Python's three most widely used plotting libraries, using two years of (made-up) surveys from six coral reef sites and the fish measured there. You'll start by choosing charts from the question being asked, then learn Matplotlib's figure and axes model properly: multi-panel figures, ticks and formatters, dates, styles and layouts. Seaborn then turns tidy data into statistical plots in a line each: histograms, density curves and ECDFs, box and violin plots, confidence intervals and heatmaps.
Next you'll build interactive charts with Plotly Express, with hover labels, facets and animation, and publish them as web pages. The last two modules are about design: colour that fits the data, figures that work for readers with colour vision deficiency (you'll check contrast with the WCAG formula and simulate how others see your charts), annotation that points out what matters, small multiples instead of spaghetti charts, and exporting at the right size and format for screens, slides and print. Every module has a lab whose scripts print exact results to check, and the capstone is a visual report on reef health, rebuilt from the data by one script. It builds on Data Analysis with Python and pandas and leads on to Data Storytelling and Dashboard Design and Interactive Data Apps with Streamlit.
What you'll learn
- Choose a chart from the question and the data, and know when a table or a single number works better
- Build and fine-tune multi-panel figures with Matplotlib's figure and axes interface: ticks, formatters, styles and layouts
- Explore distributions, relationships and categories with seaborn's statistical plots and facets
- Make interactive Plotly Express charts with hover details, facets and animation, and share them as HTML
- Use colour purposefully and accessibly, annotate what matters, and export figures at the right size and format
Skills you'll gain
Data visualisation, Matplotlib, seaborn, Plotly Express, Chart selection, Colour and accessibility, Annotation, Small multiples, Figure export
Tools
Python 3, pandas, Matplotlib, seaborn, Plotly, Chrome DevTools
Before you start
Python and basic pandas: loading a CSV, selecting columns and grouping (Data Analysis with Python and pandas covers them, with a first look at Matplotlib). You need Python 3.11 or later; the course installs Matplotlib, seaborn, Plotly and pandas in a virtual environment, and the data comes with the labs. Google Chrome is used once, to simulate colour vision deficiency.
Modules
Choosing charts and Matplotlib's figure model
Match the chart to the question and the data, then build figures precisely with Matplotlib's object-oriented interface: figures, axes, ticks, formatters and styles.
- Choosing a chart for the question (12 min)
- Figures, axes and the object-oriented interface (12 min)
- Ticks, labels, formatters and styles (12 min)
- Hands-on lab: Build a four-panel reef overview
Statistical plots with seaborn
Use seaborn's dataset-oriented functions, built on Matplotlib, to show distributions, compare groups, plot relationships with their uncertainty and draw annotated heatmaps.
- How seaborn works: long data, mappings and figure-level functions (12 min)
- Distributions: histograms, density and box plots (12 min)
- Relationships, categories and heatmaps (12 min)
- Hands-on lab: Explore fish lengths with seaborn
Interactive charts with Plotly Express
Build interactive charts in one call with Plotly Express, add hover details, facets and animation, refine them through the figure object and share them as HTML pages.
- Plotly Express: a chart from a DataFrame in one call (12 min)
- Facets, animation and refining a figure (12 min)
- Sharing interactive charts, and when to stay static (10 min)
- Hands-on lab: Build an interactive reef explorer
Colour, accessibility and annotation
Choose palettes that fit the data, design figures that still work for readers with colour vision deficiency, and annotate charts so the important point can't be missed.
- Choosing colour with a purpose (12 min)
- Designing for colour vision deficiency and contrast (12 min)
- Annotating what matters (12 min)
- Hands-on lab: Make the bleaching chart accessible
Small multiples, layout and publishing figures
Split crowded charts into small multiples, lay out multi-panel figures precisely, and export them at the right size, resolution and format for screens, slides and print.
- Small multiples (12 min)
- Laying out multi-panel figures (12 min)
- Saving figures for screens, slides and print (12 min)
- Hands-on lab: Export small multiples for a report
Project: Publish a visual report on reef health
The (fictional) marine park team that collected the reef surveys needs a short visual report for its annual meeting: a printed handout for the meeting and a page of interactive charts for the website. Using reef_surveys.csv and fish_lengths.csv from the labs, build a script, make_figures.py, that regenerates every figure in one run. The report needs at least five static figures, each a chart chosen for its question: a comparison, a distribution, a relationship, a small-multiples figure and an annotated time series of the 2025 warm spell. Use accessible colour (check the contrast and simulate colour vision deficiency), titles that state each finding, and annotation where it helps. Export every static figure as PNG at 200 dpi for screens and as SVG or PDF for print, and add an interactive HTML page with at least two Plotly charts. Finish with report.md: each figure with its title, a two- or three-sentence caption, its alternative text and any caveats (the data is a two-year sample at six sites).
Part of
The products this course names are trademarks of their owners, who haven't made or endorsed it.