cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Check out the JMP® Marketplace featured Capability Explorer add-in
Choose Language Hide Translation Bar
J_Bonnouvrier1
Level III

Add Mean to distribution plateform

Dear community,

 

Regarding the distribution plateforme, I have been asked if it was possible to display the value of the mean of the distribution on the chart?

 

Thanks and regards,

 

Jérome

1 ACCEPTED SOLUTION

Accepted Solutions
ron_horne
Super User (Alumni)

Re: Add Mean to distribution plateform

Hi @J_Bonnouvrier1 

could you please give us more information? if you want the numbers on the side of the graph you can follow this picture using the graph builder.

ron_horne_0-1635964208415.png

otherwise, if you want it on the axis you can add a reference line by right clicking on the axis>>axis settings.

Best practice is doing this once manually and if needed generalizing the script for future use.

you can see this as an example:

 

Open( "$SAMPLE_DATA/Big Class.jmp" );
dis = Distribution( Continuous Distribution( Column( :height ), Vertical( 0 ) ), ); reportdis = dis << Report; M = reportdis["Distributions", Number Col Box( 2 )][1]; SD = reportdis["Distributions", Number Col Box( 2 )][2]; dis << SendToReport( Dispatch( {"height"}, "Distrib Histogram", FrameBox, Add Text Annotation( Text( "Mean = " || Char( Round( M, 2 ) ) || " SD = " || Char( Round( SD, 2 ) ), Fixed Size( 0 ), Text Box( {0, 0, 65, 65} ), Filled( 0 ) ) ) ), Dispatch( {"height"}, "1", ScaleBox, {Add Ref Line( M, "Solid", "Medium Dark Red", Char( M ), 1, 1, Label Settings( {Label Color( "Medium Dark Red" ), Label Position( "Inside Above" )} ) )} ) );

 

Otherwise there are many ways to present the mean in a distrinution, including binning the histogram using different units as in this link: https://community.jmp.com/t5/JMP-Add-Ins/2D-Histograms/ta-p/377945

this addin allows you to use SD as bins so all is focused on the mean.

 

Let us know if this helps.

ron

 

 

 

View solution in original post

4 REPLIES 4
statman
Super User

Re: Add Mean to distribution plateform

I'm not sure if you are asking whether there is an option to display the mean automatically...I know you can always double click on the axis and add any reference line to the plot.  Put the mean in the Value box, select the color, style and size of line and Add.

Screen Shot 2021-11-03 at 10.38.42 AM.jpg

 

"All models are wrong, some are useful" G.E.P. Box
J_Bonnouvrier1
Level III

Re: Add Mean to distribution plateform

Thank you for your answer. Actually, yes, I would like the calculated mean value to be automatically displayed on the chart

ron_horne
Super User (Alumni)

Re: Add Mean to distribution plateform

Hi @J_Bonnouvrier1 

could you please give us more information? if you want the numbers on the side of the graph you can follow this picture using the graph builder.

ron_horne_0-1635964208415.png

otherwise, if you want it on the axis you can add a reference line by right clicking on the axis>>axis settings.

Best practice is doing this once manually and if needed generalizing the script for future use.

you can see this as an example:

 

Open( "$SAMPLE_DATA/Big Class.jmp" );
dis = Distribution( Continuous Distribution( Column( :height ), Vertical( 0 ) ), ); reportdis = dis << Report; M = reportdis["Distributions", Number Col Box( 2 )][1]; SD = reportdis["Distributions", Number Col Box( 2 )][2]; dis << SendToReport( Dispatch( {"height"}, "Distrib Histogram", FrameBox, Add Text Annotation( Text( "Mean = " || Char( Round( M, 2 ) ) || " SD = " || Char( Round( SD, 2 ) ), Fixed Size( 0 ), Text Box( {0, 0, 65, 65} ), Filled( 0 ) ) ) ), Dispatch( {"height"}, "1", ScaleBox, {Add Ref Line( M, "Solid", "Medium Dark Red", Char( M ), 1, 1, Label Settings( {Label Color( "Medium Dark Red" ), Label Position( "Inside Above" )} ) )} ) );

 

Otherwise there are many ways to present the mean in a distrinution, including binning the histogram using different units as in this link: https://community.jmp.com/t5/JMP-Add-Ins/2D-Histograms/ta-p/377945

this addin allows you to use SD as bins so all is focused on the mean.

 

Let us know if this helps.

ron

 

 

 

J_Bonnouvrier1
Level III

Re: Add Mean to distribution plateform

Thanks you Ron, I don't have only one but many solutions.

My intuition told me that there is no native option to display it in the distribution plateform and I needed to use a script, but the graph builder option is also an option for reporting only.

 

Best regards!

 

Jérôme