Skip to content
Graph Craft

Ridgeline Plot

FacebookX
Example: Daily login times by monthPlotly.js

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
Compare the distributions of several groups

Ridgeline Plot is a chart that stacks the density curves of several groups in rows, each overlapping the next a little so they look like a mountain ridge. Use it to see how a distribution changes across an ordered set of groups, such as the time of day users log in each month.

How to read a Ridgeline Plot

  • One row is one month. This example has 6 months, from Jan in the top row to Jun in the bottom row (made-up data).
  • The horizontal axis is the time of day users log in, from 0:00 to 24:00.
  • The height of a curve is density. The higher it is, the more logins at that time.
  • Every month has two peaks. The morning peak sits at about 9:00 in every month. The evening peak moves earlier and earlier, from about 19:45 in Jan to about 17:35 in Jun.
  • The last month is highlighted in colour so it is easy to compare with the earlier months.

Stacking shows patterns that change a little at a time, which six separate charts would show less clearly.

When to use it

  • There are many groups and the groups follow an order, such as months, years or ages. The chart uses space well when the number of groups is medium to large.
  • There is a clear pattern you want people to see, such as peaks that all move in the same direction. Without one, the groups pile on top of each other in a mess.
  • You want to save space. The overlapping curves let you fit many groups in a small area.

When not to use it

  • There are fewer than about 6 groups. Other distribution charts are better. Use a Density Plot or a Violin Plot.
  • The groups have no order or pattern. The curves overlap until they carry no information.
  • You need to read exact values. The overlapping parts hide some of the data. Use a Histogram for each group.
  • There is little data per group. A density curve can mislead. Use a Beeswarm Plot.

Common mistakes

1. Not checking the bandwidth

As with histograms and density plots, the bandwidth you choose changes the shapes a lot.

BadHeavy overlap

Synthetic data: some rows are hidden

GoodBalanced overlap

Same data: each month's line is readable

2. Ordering the groups carelessly

If the groups have no natural order, sort them by a central value so the pattern shows. This example is ordered by month.

3. Too much overlap

The overlapping parts hide the data that sits under them. Try the "Heavy overlap" variant and you will see the peaks of the upper months covered.

4. Emphasising every row

If the point is the last month, colour that curve and make the rest grey. Try the "No emphasis on last month" variant and compare, and the "Stronger color" variant, which emphasises the last month more.

5. Leaving out axis titles and units

Readers need to know what time the horizontal axis shows and which group each row is. This example titles the axis "Time of use" and labels the months on the vertical axis.

Compared with similar charts

ChartHow it differsChoose it when
Ridgeline PlotOverlapping density curvesMany groups that follow an order
Density PlotA density curve for one group or a fewThere are only a few groups
Violin PlotA shape mirrored on both sides of an axisYou compare many groups side by side
HistogramBars that count values per rangeYou want counts
Box PlotA box of summary valuesYou want a compact summary

History and development

The cover of the album Unknown Pleasures by Joy Division (1979) inspired the name "joy plots", which Jenny Bryan proposed in April 2017. In September 2017 Claus Wilke wrote that he had stopped using the name because the band's name has its origin in the Nazi concentration camps. He used "ridgeline plot" instead and changed the R package from ggjoy to ggridges. The new name does not say that the chart appeared that year.

Frequently asked questions

How is a Ridgeline different from a Joyplot?

They are the same chart. Ridgeline is the name Wilke proposed in 2017 to replace joyplot.

How many rows should it have?

It suits a medium to large number of groups. With fewer than about 6 groups, another chart may suit better. This example has 6 rows.

Can I use histograms instead of density curves?

Yes. You can use histograms in place of smooth curves, and you can colour by a numeric value instead of by group.

Why must the groups be in order?

Because a pattern that shifts a little at a time can be seen when the rows are stacked in order.

References

  • Ridgeline plot · Data to Viz · www.data-to-viz.comUsed to confirm: how to read a ridgeline plot and what to watch for
  • Goodbye joyplots · Claus O. Wilke · clauswilke.comUsed to confirm: the reason for dropping the name joyplot and using ridgeline
  • Introduction to ggridges (CRAN vignette) · Claus O. Wilke · cran.r-project.orgUsed to confirm: how to build and configure a ridgeline plot

Last updated 28 Nov 2026