Best Data Viz
Relationship

Mosaic Plot

Categorical × categorical contingency table where both row heights and column widths within each row are proportional to joint frequency.

Survey Response by Age Group

Each cell area is proportional to count

View data (12 rows)
Chart data table: Survey Response by Age Group
ResponseAgeCount
Strongly agree18-29120
Agree18-29180
Neutral18-2960
Disagree18-2940
Strongly agree30-4990
Agree30-49220
Neutral30-49110
Disagree30-4980
Strongly agree50+50
Agree50+140
Neutral50+130
Disagree50+180
Make a mosaic plot with your data

Use a mosaic plot when…

  • Cross-tabulating two categorical variables
  • Showing joint distribution where both marginals matter
  • Survey response × demographic crosstabs

Avoid when…

  • Time series (use stacked area)
  • More than two categoricals (use heatmap or alluvial)
  • Numeric × numeric data (use scatter)

Data it needs

PropertyValue
Min Rows4
Min Columns3
Column Types
stringstringnumber

Visual anatomy

Marks
rectangle
Channels
areacolor-hue
Axes
x-categoricaly-categorical

Guiding principles

Consider instead

Common mistakes

  • Confusing with marimekko — mosaic varies BOTH row heights and column widths within each row, while marimekko fixes one axis (typically column width = total) and only varies the other

  • Too many cells (>30) becomes unreadable

History

Mosaic plots were formalized by John Hartigan and Beat Kleiner in 1981 for exploratory contingency-table analysis.

Accessibility notes

Provide the underlying contingency table. Cell tooltips should report count and joint percentage.

Related reading

Got data? Let's see what works.

Drop your CSV. You'll get a Mosaic Plot plus four alternatives - ranked by which one actually fits your data best.