Dot Matrix Chart
Chart overview
Dot matrix charts (waffle charts) represent data as grids of symbols where each symbol represents a fixed quantity.
Key points
- They provide an intuitive way to show proportions and make large numbers comprehensible by breaking them into countable units.
Example Visualization

Create This Chart Now
Generate publication-ready dot matrix charts with AI in seconds. No coding required – just describe your data and let AI do the work.
View example prompt
"Create a dot matrix chart (waffle chart) showing 'US Population by Generation' where each icon represents 3 million people. Generate data for 330M total population: Baby Boomers (70M, 23 icons, blue), Gen X (65M, 22 icons, green), Millennials (72M, 24 icons, purple), Gen Z (68M, 23 icons, orange), Silent/Greatest (20M, 7 icons, gray), Gen Alpha (35M, 12 icons, pink). Arrange in a 10x11 grid (110 icons = 330M). Group icons by generation in contiguous blocks. Use person-shaped icons (fontawesome style) instead of squares. Add a legend showing generation names and birth years. Include population counts. Title: 'US Population by Generation (2024)'. Subtitle: 'Each figure = 3 million people'."
How to create this chart in 30 seconds
Upload Data
Drag & drop your Excel or CSV file. Plotivy securely processes it in your browser.
AI Generation
Our AI analyzes your data and generates the Dot Matrix Chart code automatically.
Customize & Export
Tweak the design with natural language, then export as high-res PNG, SVG or PDF.
Python Code Example
# === IMPORTS ===
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
from pywaffle import Waffle
# === USER-EDITABLE PARAMETERS ===
title = "US Population by Generation (2024)\nEach icon = 3 million people"
figsize = (12, 8)
# === EXAMPLE DATASET ===
# Population data in millions
data = {
'Generation': ['Baby Boomers', 'Gen X', 'Millennials', 'Gen Z', 'Silent/Greatest', 'Gen Alpha'],
'Population_M': [70, 65, 72, 68, 20, 35],
'Color': ['#1f77b4', '#2ca02c', '#9467bd', '#ff7f0e', '#7f7f7f', '#e377c2']
}
df = pd.DataFrame(data)
df['Icons'] = (df['Population_M'] / 3).round().astype(int)
# Print summary
print("=== US Population by Generation ===")
print(f"\nTotal Population: {df['Population_M'].sum()}M")
print(f"Total Icons: {df['Icons'].sum()} (each = 3M people)")
print(f"\nBreakdown:")
for _, row in df.iterrows():
print(f" {row['Generation']}: {row['Population_M']}M ({row['Icons']} icons)")
# Create waffle data dictionary
waffle_data = {row['Generation']: row['Icons'] for _, row in df.iterrows()}
waffle_colors = {row['Generation']: row['Color'] for _, row in df.iterrows()}
# === CREATE WAFFLE CHART ===
fig = plt.figure(
FigureClass=Waffle,
rows=11,
columns=10,
values=waffle_data,
colors=list(waffle_colors.values()),
title={'label': title, 'fontsize': 16, 'fontweight': 'bold'},
labels=[f"{k} ({v*3}M)" for k, v in waffle_data.items()],
legend={
'loc': 'lower center',
'bbox_to_anchor': (0.5, -0.15),
'ncol': 3,
'fontsize': 10,
'framealpha': 0
},
figsize=figsize,
block_arranging_style='snake'
)
plt.tight_layout()
plt.show()
# END-OF-CODE
Opens the Analyze page with this code pre-loaded and ready to execute
Console Output
=== US Population by Generation === Total Population: 330M Total Icons: 111 (each = 3M people) Breakdown: Baby Boomers: 70M (23 icons) Gen X: 65M (22 icons) Millennials: 72M (24 icons) Gen Z: 68M (23 icons) Silent/Greatest: 20M (7 icons) Gen Alpha: 35M (12 icons)
Common Use Cases
- 1Survey result display
- 2Population statistics
- 3Progress tracking
- 4Infographic elements
Pro Tips
Use 100 units for percentage display
Choose meaningful unit size
Add legend explaining unit value
Scientific Chart Selection Cheat Sheet
Not sure whether to use a Violin Plot, Box Plot, or Ridge Plot? Download our single-page reference mapping the most-used scientific chart types, exactly when to use them, and the core Matplotlib/Seaborn functions.