Ridgeline Plots in 'ggplot2'

Ridgeline plots provide a convenient way of visualizing changes in distributions over time or space. This package enables the creation of such plots in 'ggplot2'.

Build Status Coverage Status CRAN_Status_Badge CRAN_Downloads_Badge

Geoms to make ridgeline plots using ggplot2, written by Claus O. Wilke

This package has now been officially relased on CRAN. Most things should work as expected, and the API should now be relatively stable. For feedback and feature requests, please open issues on github.

About ridgeline plots

Ridgeline plots are partially overlapping line plots that create the impression of a mountain range. They can be quite useful for visualizing changes in distributions over time or space. These types of plots have also been called "joyplots", in reference to the iconic cover art for Joy Division's album Unknown Pleasures. However, given the unfortunate origin of the name Joy Division, the term "joyplot" is now discouraged.


Stable release:


Latest development version:



ggplot(diamonds, aes(x = price, y = cut)) +
  geom_density_ridges(scale = 4) + theme_ridges() +
  scale_y_discrete(expand = c(0.01, 0)) +   # will generally have to set the `expand` option
  scale_x_continuous(expand = c(0, 0))      # for both axes to remove unneeded padding

Documentation and Examples

First read the package vignette. Then read the reference manual.


ggridges 0.4.1

  • Skip vdiffr visual tests when compiling on CRAN

ggridges 0.4.0

  • Initial import of code base from ggjoy, and renaming: geom_joy -> geom_density_ridges stat_joy -> stat_density_ridges theme_joy -> theme_ridges


  • Added an option to center axis labels to theme_joy().

ggjoy 0.3.0

  • Added cyclical scales that make it easy to alternate between fill colors and other aesthetics.

ggjoy 0.2.0

Numerous improvements:

  • New stat binline that can be used to draw histogram joyplots.
  • Various improvements in stat_joy. In particular, it now works properly with multiple panels. It also now has parameters from and to to limit the range of density estimation, just like density().
  • Improvements in the vignettes
  • New geoms geom_ridgeline_gradient and geom_joy_gradient that can handle gradient fills.

ggjoy 0.1.0

First complete implementation ready for initial release

Reference manual

It appears you don't have a PDF plugin for this browser. You can click here to download the reference manual.


0.5.0 by Claus O. Wilke, 6 months ago


Browse source code at https://github.com/cran/ggridges

Authors: Claus O. Wilke [cre, aut], RStudio [cph] (Copyright for ggplot2 code copied to ggridges)

Documentation:   PDF Manual  

GPL-2 | file LICENSE license

Imports ggplot2, grid, plyr, scales, withr

Suggests covr, dplyr, gridExtra, ggplot2movies, DAAG, forcats, knitr, rmarkdown, testthat, vdiffr, viridis

Imported by HistDAWass, Seurat, bayesplot, cRegulome, dextergui, jmv, scatr, tidybayes, trackeR, userfriendlyscience.

Depended on by ggjoy.

Suggested by CAISEr, bench, sjPlot, sjstats, trialr.

See at CRAN