cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Choose Language Hide Translation Bar

Generating Box Plot with Overlayed Histogram?

Is there a way to generate a box plot with the histogram of the data overlayed on top of the box? Similar to the attached picture from Spotfire.

 

I used Spotfire at my previous company. Now we are using JMP. I'm trying to create some plots that look similar to better understand the data. Thanks.

maxresdefault (2).jpg

1 ACCEPTED SOLUTION

Accepted Solutions

Re: Generating Box Plot with Overlayed Histogram?

You can also make something similar using Graph Builder. I used the Big Class table to illustrate.

You drag each of your variables to the Y-axis where each subsequent variable is placed "below" the others so that the graphs are stacked. Choose the histogram element. Now hold the shift key and choose the boxplot element. I then modified the boxplot to have the Solid Box Type Style. I changed the width to be 3 and adjusted the baseline axis so that you could see the entire boxplot. You can turn on the 5-number summaries for the boxplots and/or the means and standard deviations for the histograms (I did neither here).

Dan_Obermiller_0-1623201300160.png

 

If your data is in a single column and the groupings defined in another column, you could drag the data to the y-axis. Then drag the grouping column to the x-axis. Select the histogram element. Shift-click on the boxplot element. This will give you an overlay slider (see the attached picture) that you can use to control how much the boxplot overlays the histogram. You can also right-click on the graph and customize the transparency of the boxplots and/or histograms to get the look you really want.

 

As an aside, your variable E has two potential outliers identified by the boxplot that don't seem to have a corresponding bar on the histogram.

 

Dan Obermiller

View solution in original post

3 REPLIES 3
txnelson
Super User

Re: Generating Box Plot with Overlayed Histogram?

Here is one way to do this in JMP, using the Distribution Platform

txnelson_0-1623190845630.png

 

Jim

Re: Generating Box Plot with Overlayed Histogram?

You can also make something similar using Graph Builder. I used the Big Class table to illustrate.

You drag each of your variables to the Y-axis where each subsequent variable is placed "below" the others so that the graphs are stacked. Choose the histogram element. Now hold the shift key and choose the boxplot element. I then modified the boxplot to have the Solid Box Type Style. I changed the width to be 3 and adjusted the baseline axis so that you could see the entire boxplot. You can turn on the 5-number summaries for the boxplots and/or the means and standard deviations for the histograms (I did neither here).

Dan_Obermiller_0-1623201300160.png

 

If your data is in a single column and the groupings defined in another column, you could drag the data to the y-axis. Then drag the grouping column to the x-axis. Select the histogram element. Shift-click on the boxplot element. This will give you an overlay slider (see the attached picture) that you can use to control how much the boxplot overlays the histogram. You can also right-click on the graph and customize the transparency of the boxplots and/or histograms to get the look you really want.

 

As an aside, your variable E has two potential outliers identified by the boxplot that don't seem to have a corresponding bar on the histogram.

 

Dan Obermiller

Re: Generating Box Plot with Overlayed Histogram?

Thanks guys! I was able to get it to work with Dan's suggestion. I saw that approach as the most straight forward for a novice like myself. A bunch of my colleagues didn't even know about the overlay of multiple graph types by holding shift and selecting. So that was a nice adder to our knowledge!