TDS Archive

An archive of data science, data analytics, data engineering, machine learning, and artificial…

Member-only story

PYTHON | DATA | VISUALISATION

Understanding Mosaic Plots

A comprehensive guide to effectively plot multi-variate datasets using statsmodels and Matplotlib

David Farrugia
TDS Archive
Published in
7 min readJun 13, 2023

--

Photo by Dimitry B on Unsplash

We’re living in a world that’s flooded with data — a sea of numbers that’s constantly expanding. But in that sea, there are precious pearls of insights waiting to be discovered.

The key to finding these pearls? Data visualisation — the process of taking raw data and presenting it in a visually digestible manner that is easier to understand and interpret.

With data visualisation, you’re breathing life into those raw numbers, transforming them into a form that reveals hidden patterns, underlying trends, and crucial connections that the data might otherwise hide.

Among the arsenal of tools at our disposal for data visualisation, there is the famous Matplotlib.

This powerful Python library is versatile and robust.

Hidden within Matplotlib’s bag of tricks is a gem that you might not have come across before — the mosaic plot.

These plots offer a powerful way of visualising categorical data across multiple dimensions.

--

--

TDS Archive
TDS Archive

Published in TDS Archive

An archive of data science, data analytics, data engineering, machine learning, and artificial intelligence writing from the former Towards Data Science Medium publication.

David Farrugia
David Farrugia

Written by David Farrugia

Data Scientist | AI Enthusiast and Researcher | Talks about Python, AI, and Data. Get in touch — davidfarrugia53@gmail.com

No responses yet