joyPlot - Ridgeline data representation

Plot several datasets in a single axis using the ridgeline representation.
Updated 23 Apr 2020

View License

Editor's Note: This file was selected as MATLAB Central Pick of the Week

This function plots the given datasets in a single figure and axis, and resembling the cover of Joy Divisions' Unknown Pleasures by Peter Saville (and in many other newspapers, journals, etc.).

The function is very simple and lightweight and only uses the MATLAB(R) built-in functions fill and plot. I am actually amazed that this wasn't programmed before, but there you go.

The figures are extremely customizable. I provided some documentation in the files section.


Cite As

Santiago Benito (2024). joyPlot - Ridgeline data representation (, MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R2019b
Compatible with any release
Platform Compatibility
Windows macOS Linux

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!


Version Published Release Notes

- Now it is possible to change the color of the stroke line as a function of the local height.
- New examples in the documentation show how to use this.