Hexbin plotA scatter with too many dots.
When dots pile into a blob, count them instead. Each hexagon's colour says how many points fall inside.
- Answers Do two things move together?
- Your data two numbers per item
- Items about 500 to millions
- Cells hexagons of one size
- Excel and Power BI not built in
What is a hexbin plot?
A hexbin plot is a scatter plot for too many dots. It covers the chart with a grid of hexagons and colours each hexagon by how many dots fall inside: pale for a few, dark for many. Where a plain scatter turns into one solid blob, the hexbin still shows where the points crowd and how the crowd is shaped.
A taxi company plots 520 trips by distance and fare. Most are short city rides, and they crowd into the dark hexagons at the bottom left; a smaller group of airport trips makes a second patch at the top right.
Why use a hexbin plot?
Because thousands of dots on top of each other hide the shape.
- Counts, not blobs. The darkest hexagon is where most points are.
- Fast to draw. A few hundred hexagons instead of a million dots.
- Shows clusters. Two crowds, a ridge or a gap stay visible.
- Hexagons, not squares. They tile the plane and look less blocky than a square grid.
How does a hexbin plot work?
Four steps turn many dots into counted cells.
- Step 1 of 4Two axesDistance across, fare up, as on a scatter plot.
- Step 2 of 4All the dots520 trips: the middle is one solid blob.
- Step 3 of 4A grid of hexagonsCover the chart with hexagons of one size and count the dots in each.
- Step 4 of 4Colour by countDark for many trips, pale for a few, empty for none.
What are the parts of a hexbin plot?
Four parts, and each one has a job.
- Hexagonone cell; its colour is its count
- Dark cellwhere the most points fall
- X axisthe first number
- Y axisthe second number
How do you read a hexbin plot?
Three looks, in this order.
- Find the darkest cellsShort city trips of about 8 km and 20 € are the most common.
- Look for other patchesA second, paler patch: airport trips around 24 km and 52 €.
- Read the overall shapeBoth patches run up to the right: longer trips cost more.
What kinds of hexbin plot are there?
The same trips, three ways.
- Kind 1HexagonsCounted cells, darker for more.
- Kind 2RingsSmooth rings around the crowds, like a map's height lines.
- Kind 3Rings over dotsThe rings with faint dots underneath.
When should you use a hexbin plot?
When a scatter plot has so many dots that they hide each other.
- there are hundreds to millions of points
- dots overlap into blobs
- you want to see where they crowd
- both numbers are continuous
- there are fewer than a few hundred points (a scatter plot)
- single items matter (a scatter with names)
- you want a smooth shape (a contour plot)
Hexbin or scatter plot?
A hexbin for crowds, a scatter for single items.
On the scatter plot the 400 city trips pile into one dark smear, so the reader cannot tell where it is thickest. The hexbin counts them: the darkest cells show the most common trip, and the airport patch shows how much smaller it is.
How do you make a hexbin plot?
Not built into Excel or Power BI; one line in Python or R.
In Python, matplotlib's hexbin draws one from two columns, with gridsize for the size of the hexagons; seaborn's jointplot(kind="hex") adds histograms on the sides. In R, geom_hex in ggplot2 does the same. In Power BI, run that code in a Python or R visual (Python and R visuals in Power BI); a plain scatter chart with see-through dots is the built-in fallback.
What goes wrong with hexbin plots?
The most common mistake, and its fix: the wrong hexagon size.
- too big and the shape becomes a few blocks
- too small and every hexagon holds one dot
- about 20 to 50 hexagons across
- try two sizes
- keep the one that shows the shape
| Mistake | Why it hurts | Fix |
|---|---|---|
| Hexagons too big or too small | Blocks or noise | About 20 to 50 across |
| No colour key | Readers cannot read the count | A key from pale to dark |
| Few points | Every cell holds one dot | A scatter plot |
| A rainbow of colours | Hard to rank | One colour from pale to dark |
| Different axes per chart | Patches cannot be compared | The same axes and hexagon size |
Every chart for “Do two things move together?”
- Two numbersScatter plotOne dot per item, two numbers as its position.
- Two numbersTrend lineThe straight line that best fits a scatter of dots.
- Two numbersContour plotRings around where dots crowd, like height lines on a map.
- Three numbersBubble chartA scatter plot whose dot size is a third number.
- Many numbersScatterplot matrixA scatter plot for every pair of numbers, in a grid.
- Many numbersCorrelation matrixA grid of how strongly each pair of numbers moves together.
- Two categoriesHeat mapA grid where colour shows the value, so patterns jump out.
- Two categoriesQuadrant chartA scatter split into four boxes, for sorting items into groups.
Read on, step by step.
Does it fit your data? Try it.
Paste your table into Chart Compass, say what the chart should show, and see the charts that fit, drawn with your own numbers. It runs in your browser, so the data stays with you.