Best Data Viz
Relationship

Heatmap

Color-coded matrix revealing patterns across two categorical dimensions.

Sales by Day & Time

Hourly patterns

View data (12 rows)
Chart data table: Sales by Day & Time
HourDaySales
9amMon12
12pmMon25
3pmMon18
9amTue15
12pmTue30
3pmTue22
9amWed10
12pmWed28
3pmWed20
9amThu18
12pmThu35
3pmThu24
Make a heatmap with your data

Use a heatmap when…

  • Cross-tabulation of two categories
  • Finding patterns in matrices
  • Correlation matrices

Avoid when…

  • Continuous x/y data (use contour)
  • Few cells (use table)
  • When precision matters (color is imprecise)

Data it needs

PropertyValue
Min Rows4
Min Columns3
Column Types
stringstringnumber

Visual anatomy

Marks
rectangle
Channels
color-luminanceposition-xposition-y
Axes
x-categoricaly-categorical

Guiding principles

Consider instead

Common mistakes

  • Using rainbow colormap

  • No legend for color scale

  • Too many cells to read

History

Used in biology since the 1950s for gene expression; term coined by software designer Cormac Kinney in 1991.

Accessibility notes

Use a perceptually uniform, colorblind-safe colormap (viridis, magma, or ColorBrewer YlGnBu). Render values directly in cells when space allows so the chart isn't color-only. Provide a sortable data table as fallback.

Related reading

Got data? Let's see what works.

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