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

- JMP User Community
- :
- Discussions
- :
- Overlay histogram and cdf on single plot with separate editable y-axis ranges

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

Highlighted

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

Aug 22, 2018 10:06 AM
(3977 views)

I can create histograms and cdfs seperately using the distribution tool. I can even overlay them on one graph if I copy and paste frame contents between the two graphs, but at this point the cdf is cropped and does not display correctly. Is there an easier way to do this?

1 ACCEPTED SOLUTION

Accepted Solutions

Highlighted

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

There might be an easier method, but I create a Summary table of the response returning the % of Total. Then compute the **bleep** Percent then graph the Count and **bleep** percent as 2 Y vaariables, making the **bleep** Percent the right axis.

Here is the method using a script, below is the resulting picture

```
Names Default to Here(1);
dt = Open("$Sample_Data/Big Class.jmp");
dtsum = dt << Summary(
Group( :height ),
Name( "% of Total" )(:height),
Freq( "None" ),
Weight( "None" )
);
dtsum:N Rows << set name("Count");
cumcol = dtsum << New Column("**bleep** Sum", Numeric, Continuous,
Format( "Percent", 12, 1 ),
Formula(
If( Row() == 1,
:Name( "% of Total(height)" ),
:Name( "% of Total(height)" ) + Lag( :**bleep** Sum, 1 )
)
),
);
gb = dtsum << Graph Builder(
Size( 534, 448 ),
Show Control Panel( 0 ),
Variables(
X( :height ),
Y( :**bleep** Sum, Side( "Right" ) ),
Y( :Name( "% of Total(height)" ), Position( 1 ) )
),
Elements(
Bar( X, Y( 2 ), Legend( 17 ) ),
Points( X, Y( 1 ), Legend( 14 ) ),
Smoother( X, Y( 1 ), Legend( 15 ) )
),
SendToReport(
Dispatch(
{},
"**bleep** Sum",
ScaleBox,
{Format( "Percent", 12, 1 ), Min( 0 ), Max( 1.02551020408163 ),
Inc( 0.1 ), Minor Ticks( 1 )}
),
Dispatch(
{},
"400",
LegendBox,
{Legend Position( {17, [2], 14, [0], 15, [1]} ), Position( {2, 0, 1} )}
)
)
);
```

2 REPLIES 2

Highlighted

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

There might be an easier method, but I create a Summary table of the response returning the % of Total. Then compute the **bleep** Percent then graph the Count and **bleep** percent as 2 Y vaariables, making the **bleep** Percent the right axis.

Here is the method using a script, below is the resulting picture

```
Names Default to Here(1);
dt = Open("$Sample_Data/Big Class.jmp");
dtsum = dt << Summary(
Group( :height ),
Name( "% of Total" )(:height),
Freq( "None" ),
Weight( "None" )
);
dtsum:N Rows << set name("Count");
cumcol = dtsum << New Column("**bleep** Sum", Numeric, Continuous,
Format( "Percent", 12, 1 ),
Formula(
If( Row() == 1,
:Name( "% of Total(height)" ),
:Name( "% of Total(height)" ) + Lag( :**bleep** Sum, 1 )
)
),
);
gb = dtsum << Graph Builder(
Size( 534, 448 ),
Show Control Panel( 0 ),
Variables(
X( :height ),
Y( :**bleep** Sum, Side( "Right" ) ),
Y( :Name( "% of Total(height)" ), Position( 1 ) )
),
Elements(
Bar( X, Y( 2 ), Legend( 17 ) ),
Points( X, Y( 1 ), Legend( 14 ) ),
Smoother( X, Y( 1 ), Legend( 15 ) )
),
SendToReport(
Dispatch(
{},
"**bleep** Sum",
ScaleBox,
{Format( "Percent", 12, 1 ), Min( 0 ), Max( 1.02551020408163 ),
Inc( 0.1 ), Minor Ticks( 1 )}
),
Dispatch(
{},
"400",
LegendBox,
{Legend Position( {17, [2], 14, [0], 15, [1]} ), Position( {2, 0, 1} )}
)
)
);
```

Highlighted
##

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

Re: Overlay histogram and cdf on single plot with separate editable y-axis ranges

Created:
Aug 22, 2018 2:35 PM
| Last Modified: Aug 22, 2018 4:22 PM
(3952 views)
| Posted in reply to message from gzmorgan0 08-22-2018

Too funny!

I abbreviated Cumulative Sum in my attached script and previous post), and the JMP blog converted it to "** bleep** Sum" when I posted it. Make the changes accordingly.

Article Labels

There are no labels assigned to this post.