Ridgeline plotShapes stacked like hills.
One smooth curve per group, stacked and slightly overlapping, like a range of hills. Watch the peaks move from row to row.
- Answers How are the values spread?
- Your data values of one number per group
- Values about 30 or more per group
- Groups 4 to 20, in an order
- Excel and Power BI not built in
What is a ridgeline plot?
A ridgeline plot (also a joy plot) draws one smooth density curve per group, each on its own baseline, stacked from top to bottom and slightly overlapping. Because each curve keeps its own row, many groups fit in one picture, and the reader sees how the shape shifts from one group to the next.
A town records the daily high temperature in six months of one year. Each month is a hill. Read down the rows and the hill walks right from January to July, then back again.
Why use a ridgeline plot?
Because it shows the shape of many groups without tangling them.
- Many groups. Six, twelve or twenty rows still read.
- Shift at a glance. The peaks move along the rows like a wave.
- Shape, not just the middle. Wide, narrow or two-humped, each row shows it.
- Compact. The overlap saves height.
How does a ridgeline plot work?
Four steps turn groups into hills.
- Step 1 of 4Every valueEach day's high as a dot, one row per month.
- Step 2 of 4One curve per rowA smooth curve of each month's days, all on one axis: they tangle.
- Jan
- Mar
- May
- Jul
- Step 3 of 4Give each its own rowEach month gets its own baseline, in order.
- Step 4 of 4Let them overlapEach hill may rise into the row above, to save room.
What are the parts of a ridgeline plot?
Four parts, and each one has a job.
- Groupthe name of the row
- Baselineeach curve's own zero
- Peakthe most common value of the group
- Value axisthe number, shared by every row
How do you read a ridgeline plot?
Three looks, in this order.
- Follow the peaksDown the rows, the peak walks right to July, then back.
- Find the warmest rowJuly's hill sits furthest right, around 29 °C.
- Compare the widthsJanuary's hill is narrow: cold days, all alike.
What kinds of ridgeline plot are there?
The same months, three ways.
- Kind 1RidgesOverlapping hills, one per month.
- Kind 2One month litThe other months fade, for one story.
- Kind 3Boxes insteadA box plot per month: the summary, no shape.
When should you use a ridgeline plot?
When many groups in an order each have a shape worth seeing.
- there are about 4 to 20 groups
- the groups have an order (months, ages, years)
- the shift of the shape is the story
- each group has about 30 values or more
- there are only 2 or 3 groups (overlapping density curves)
- exact numbers matter (box plots)
- the groups have no order (a box plot sorted by median)
Ridgeline or overlapping curves?
Ridges for many groups, overlapping curves for two or three.
- Jan
- Mar
- May
- Jul
- Sep
With five months on one axis, the density curves pile on top of each other: May and September even sit in the same place. The ridgeline gives each month its own row, so every shape and every shift stays readable.
How do you make a ridgeline plot?
Not built into Excel or Power BI; a few lines in Python or R.
In R, the ggridges package adds geom_density_ridges to ggplot2. In Python, a seaborn FacetGrid with one kdeplot per row and a small negative space between rows gives the same look. In Power BI, run that code in a Python or R visual (Python and R visuals in Power BI).
What goes wrong with ridgeline plots?
The most common mistake, and its fix: too much overlap.
- tall curves cover the rows above
- the hidden parts of the shapes are lost
- let hills rise about one row into the next
- draw the lower rows on top
- a little see-through fill
| Mistake | Why it hurts | Fix |
|---|---|---|
| Too much overlap | Shapes hide behind each other | Rise about one row, no more |
| Groups in no order | The wave of shifting peaks is lost | An order that means something |
| Few values per group | The shapes are invented | About 30 values or more |
| No value axis | Readers cannot tell where a peak is | A shared axis at the bottom |
| Reading heights across rows | Each curve is scaled the same way, not as a count | Compare positions and widths |
Every chart for “How are the values spread?”
- One groupHistogramTouching bars that count how many values fall in each range.
- One groupDensity plotA smooth curve of where values bunch up.
- One groupStrip plotEvery value as a dot along one line.
- One groupBeeswarm plotDots that push apart instead of overlapping, so every value shows.
- Comparing groupsBox plotThe middle half as a box, the median as a line, the rest as whiskers.
- Comparing groupsViolin plotA box plot with the shape of the values drawn around it.
- Comparing groupsRaincloud plotHalf a violin, a box and the dots, in one picture.
- Comparing groupsPopulation pyramidTwo histograms back to back, by age and sex.
- CumulativeCumulative distributionA rising line of the share of values at or below each point.
- CumulativePareto chartBars from biggest to smallest with a running total line.
- Fit checkQ-Q plotDots along a line when the data fits the shape you expect.
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.