- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Overlay histogram and cdf on single plot with separate editable y-axis ranges
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?
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: Overlay histogram and cdf on single plot with separate editable y-axis ranges
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} )}
)
)
);
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: Overlay histogram and cdf on single plot with separate editable y-axis ranges
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} )}
)
)
);
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: Overlay histogram and cdf on single plot with separate editable y-axis ranges
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.