Turn on suggestions

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

- JMP User Community
- :
- Discussions
- :
- Overlay several histograms

Topic Options

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Email to a Friend
- Report Inappropriate Content

Nov 7, 2011 8:03 AM
(15055 views)

Hi all,

I am looking for a way in JMP to overlay histograms coming from 3 different sources on one plot.

I've been trying several things but all I could do thus far is put the three histograms next to or below one another.

What I would like to have is one plot containing the different histograms in different colors.

Any pointers?

Thanx!

1 ACCEPTED SOLUTION

Accepted Solutions

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Email to a Friend
- Report Inappropriate Content

I haven't had good results trying to overlay histograms because one obscures the other or the details get muddied if using transparency. However, you can do it in JMP with the Right-Click in Graph > Edit > Copy Frame Contents from one graph and use Paste Frame Contents into another graph.

Another option is Compare Densities in the Oneway platform which shows overlaid (or stacked) smooth density curves.

3 REPLIES 3

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Email to a Friend
- Report Inappropriate Content

Overlay several histograms

I don't think you can combine histograms onto one plot using Analyze > Distributions.

But, if your data is categorical you can simply make a bar chart of the different variables.

I'm guessing that your data is not categorical, in which case you need to bin your data into categorical columns, and then make a barchart of the categorical columns.

Can you give us a better idea of what your data looks like?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Email to a Friend
- Report Inappropriate Content

Overlay several histograms

Below is a jsl example of PMroz' suggestion using the Chart platform or alternatively Graph Builder to generate overlaid "histograms". Both platforms leave space between bars which may not be desired. It seems not to be possible to adjust spacing as in e.g. Excel.

```
dt = Open( "$ENGLISH_SAMPLE_DATA/Big Class.jmp" );
// get bins from histogram
dist = dt << Distribution(
Column( :Weight ),
save( level midpoints ),
invisible
);
dist << close window;
col = Column( dt, N Col( dt ) );
col << set modeling type( Nominal );
// Chart histogram
Chart( X( col, :sex ), Y( N ), Bar Chart( 1 ) );
// Graph Builder histogram
Graph Builder(
Show Control Panel( 0 ),
Variables( X( col ), Overlay( :sex ) ),
Elements(
Bar(
X,
Legend( 2 ),
Bar Style( "Side by side" ),
Summary Statistic( "Mean" )
)
)
);
```

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Email to a Friend
- Report Inappropriate Content

I haven't had good results trying to overlay histograms because one obscures the other or the details get muddied if using transparency. However, you can do it in JMP with the Right-Click in Graph > Edit > Copy Frame Contents from one graph and use Paste Frame Contents into another graph.

Another option is Compare Densities in the Oneway platform which shows overlaid (or stacked) smooth density curves.