Waffle chart

A Waffle Chart represents categorical data using a grid of equally sized squares or rectangles, each colored or shaded to depict different categories or segments.

Python enables the creation of waffle charts through the PyWafflelibrary. This page offers numerous examples of charts built using the PyWaffle library, ranging from basic implementations to more advanced customizations.

⏱ Quick start

# useful libraries, including pyWaffle
import matplotlib.pyplot as plt
from pywaffle import Waffle

# create simple dummy data
data = {'Kevin': 10, 'Joseph': 7, 'Yan': 8}

# Basic waffle
  legend={'loc': 'upper left', 'bbox_to_anchor': (1.05, 1)},

Waffle chart with PyWaffle

The examples below should guide you through the Waffle class usage. It starts with a very basic example and then provides hints on how to apply usual customization like using icons or showing percentages in the legend.


👋 This document is a work by Yan Holtz. You can contribute on github, send me a feedback on twitter or subscribe to the newsletter to know when new examples are published! 🔥