Skip to content
Graph Craft

Hexbin Plot

FacebookX
Example: Age vs. income of 2,400 customers (made-up data)Apache ECharts

Variant: Standard

Made-up data, for demonstration only

Variants

4 types · click one to see it in the frame above
Difference from standard
The recommended type; use it as a starting point
Use when
See point density when there is a lot of data

Hexbin Plot is a scatter chart that divides the area into hexagonal cells, counts the data points in each cell, and colours the cell by the count. This example has 2,400 customers (made-up data). The horizontal axis is age and the vertical axis is income. Dark cells are where customers are packed most densely.

How to read a Hexbin Plot

  • Read colour as a count, not a value. A dark cell has many points and a pale cell has few. A colour bar must tell you how many people a given darkness means.
  • Look at where the darkest cell is. In this example the cell with 101 points is at about age 33 and an income of $63K. The group of dark cells sits at about 30–45 years old and an income of $60K–$80K.
  • Count the blobs. One blob is one group. Two blobs are two different groups.
  • Look at the tails. Faint cells far out are small groups or outliers, which pale colour makes harder to see than points would.
  • Try changing the cell size. Try the "Large cells" and "Fine cells" variants to see whether the shape stays the same.

When to use it

  • There are so many points that they merge into a solid mass. With that many points, making them translucent is not enough. Divide into cells and count instead.
  • You want to know where the data is densest without looking at points one by one.
  • You want to summarise overlapping points in cells. Hexagons are one cell shape for counting points in 2 dimensions.

When not to use it

  • There is little enough data that points do not overlap. This family of charts helps when there is a lot of data. If points do not overlap, use a Scatter Plot.
  • You need to inspect individual outliers. Cell colour hides isolated points.
  • You want a smooth density curve. Use a 2D Density Plot.

Common mistakes

1. Choosing a cell size that is too big or too small

This family of charts is sensitive to cell size. Different sizes can lead to different conclusions. Try several sizes before choosing.

2. No colour bar or unit

Readers do not know how many people a dark cell means. Always add a colour bar and name the unit.

3. Using a rainbow palette

Choose a good palette. One colour running from light to dark is easier to read.

4. Comparing colour across groups of different sizes without adjusting

If you compare two groups with very different numbers of people, the cells of the larger group will always be darker. Use percentages or separate charts.

5. Confusing it with a hexbin map

The term hexbin map is used for two different ideas: a map where every area is a hexagon, and counting coordinate points in hexagonal cells. This page is about the second.

Compared with similar charts

ChartHow it differsChoose it when
Hexbin PlotCounts points in hexagonal cellsThere are many points and you want to see density
Scatter PlotOne point per rowThere is little data and you need to see individual points
2D Density PlotSmooth lines or colour from a density estimateYou want a smooth shape
HeatmapA square table of values you already haveThe data is a matrix, not raw points

Frequently asked questions

How is a hexbin different from a 2D histogram?

Both count points per cell. The difference is the cell shape. A hexbin uses hexagons and a 2D histogram uses squares.

Why hexagons?

Hexagons divide the 2-dimensional area into cells for counting points, which reduces the problem of overlapping points. The squares in a 2D histogram also summarise points per cell.

How many points before I should use it?

There is no fixed threshold. If you can still see the points apart, use an ordinary scatter plot.

References

  • Fundamentals of Data Visualization, ch. 18: Handling overlapping points · Claus O. Wilke · clauswilke.comUsed to confirm: overlapping points, hexbins and contour lines
  • 2D density plot · Data to Viz · www.data-to-viz.comUsed to confirm: how to read a 2D density plot and what to watch for
  • Hexbin map · Data to Viz · www.data-to-viz.comUsed to confirm: how to read a hexbin map and what to watch for

Last updated 28 Nov 2026