Essential Graphing > Graph Builder Examples > Example of an Overlaid Histogram and Ridgeline Chart
Publication date: 08/13/2020

Example of an Overlaid Histogram and Ridgeline Chart

Data

This example uses data from 442 diabetic patients. The data include baseline clinical and laboratory data as well as a binary measure of diabetes disease progression obtained one year after each patient’s initial visit. This measure classifies disease progression as Low or High.

Techniques

This example uses overlaid histograms and a ridgeline chart.

Goal

The goal of this example is to explore the distribution of a continuous variable grouped by categories. Specifically, you are interested in exploring how the distribution of HDL varies by gender and then by disease progression.

1. Select Help > Sample Data Library and open Diabetes.jmp.

2. Select Graph > Graph Builder.

3. Select HDL and drag it to the X zone.

4. Select Gender and drag it to the Overlay zone.

5. Click the Histogram element icon .

6. In the Histogram properties panel, from the Histogram Style list, select Kernel Density.

Figure 4.24 Overlaid HDL Histograms by Gender 

The histograms indicate that HDL levels are higher in males (blue) than females (pink). The blue distribution falls to the right, or higher on the HDL scale, than the pink distribution. Now change the graph to view the differences in gender in a ridgeline plot.

7. Select Gender and drag it to the Y zone.

8. In the Histogram properties panel, move the Overlap slider to overlap the histograms (until the slider is about 3/4 up).

9. Click Done.

10. Double-click in the legend. In the Legend Settings window, double-click 1 and type male. Double-click 2 and type female.

11. Click OK.

Tip: If an item in the legend is still highlighted, click it to deselect it.

Figure 4.25 Ridgeline Chart of HDL by Gender and Diabetes Level 

The ridgeline chart shows the gender distributions offsets.

Want more information? Have questions? Get answers in the JMP User Community (community.jmp.com).
.