A ridgeline plot, also known as a joy plot, is a chart type visualizing the data as overlapping density curves. Joy plots got its name from the album cover Unknown Pleasures by Joy Division in 1979. They are good-looking visualizations for comparing the distributions of several subgroups, and the number of groups is large. In this guide, we will show you How to create a ridgeline plot (joy plot) in Excel.
Data
A simple data series data is enough for joy plots. Although it doesn’t affect the use of the chart, the higher the number of data points the better the chart looks. Because Excel's area charts do not have "smooth" line support, the number of data points can replicate the smoothness effect. Thus, size does matter.
Creating ridgeline plot (joy plot)
A joy plot's resemblance to an area chart is unmistakable. The trick is to give the offset between data series. We can create those empty spaces between each axis by inserting "hidden" data between each actual one.
For the hidden area, we need to generate a similar size table with the offset data. You can think these areas are overlapping rows. Each row should have equal height as well as each should be lower than the maximum value of each row to ensure overlapping.
A constant will ease the calculations at this point. Select a value that fits the description above and write it down in a cell. We are using cell C18 which is named "Offset".
Next, we will generate the offset values. There will be n-1 gaps for n data series. However, to ensure consistency, we also have a row for the 0th gap. The Offset 0 row will get 0 values only. The other data series will have an offset value multiplied by the row. A helper column with the row (gap) numbers will make things easy.
Finally, create another data table which contains the sum of actual values and the offset values. This action will elevate the actual values.
Once the chart data is ready, select the data and insert an Area Chart by following Insert > Charts > Insert Line or Area Charts > 2D Area Chart.
The chart is created but far from a joy plot.
At this step, select the "offset" data table and copy it by pressing Ctrl + C. Then, select the chart and paste the data by pressing Ctrl + V.
Although the chart seems to become an abomination, do not lose hope. The next step is to "hide" them. Select an offset area by clicking on it and select White for the Fill Color. Doing this action right now is far easier than later.
After hiding (white coloring) each offset section, right-click on the chart and Select Data item to open the Select Data Source dialog.
In the dialog, select an offset data series and move it to between corresponding data series. For example, in our chart, the "Offset 7" should go between "Product 1" and "Product 2", because the "Product 1" has the highest value in its column.
After every offset is moved to correct place, click OK button to see the results.
The creating a joy plot is almost ready. The rest is for looks. Obviously, you may want to change the title and remove the offset indicators from the legend. Just click any item you do not want and press the Delete key.
Removing the vertical axis and moving the horizontal to above may help.