cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Browse apps to extend the software in the new JMP Marketplace
Choose Language Hide Translation Bar
carole
Level III

Get color of points from plotcolbox of oneway analysis table in JSL

Hello,

I would like to get the color (bue or red) of the dots that are into the last colplotbox of the summary table given by oneway analysis (Means and Std Deviations).

Below is the JSL to tun the analysis.

I can get the value of the dots with Get() but I don't know how to get the color of the dots: outliers are in red, others in blue.

I need this information to make some other data treatments.

Do you know also which statistical rule is applied to put this color ? 

 

Thanks.

Regards.

 

JMP17.2.0

dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
platoneway = Oneway(
	Y( :weight ),
	X( :age ),
	Each Pair( 1 ),
	All Pairs( 1 ),
	Comparison Circles( 0 ),
	Means and Std Dev( 1 ),
	Box Plots( 1 ),
	Mean Diamonds( 1 ),
	Mean Error Bars( 1 ),
	Std Dev Lines( 1 ),
	Comparison Circles( 0 ),
	Grand Mean( 0 ),
	SendToReport(
		Dispatch(
			{"Means and Std Deviations"},
			"Std Dev Lower 95%",
			NumberColBox,
			{Visibility( "Visible" )}
		),
		Dispatch(
			{"Means and Std Deviations"},
			"Std Dev Upper 95%",
			NumberColBox,
			{Visibility( "Visible" )}
		),
		Dispatch(
			{"Means and Std Deviations"},
			"~Std Dev",
			PlotColBox,
			{Visibility( "Visible" )}
		),
		Dispatch( {}, "Means Comparisons", OutlineBox, {Close( 1 )} )
	)
);

reponeway = platoneway << report();
reponeway["Means and Std Deviations"][PlotColBox(1)] <<Get();
4 REPLIES 4

Re: Get color of points from plotcolbox of oneway analysis table in JSL

The colour of the points is based on whether the Lower of Upper CL values cross the reference line in the PCB (i.e. for Difference, does it cross 0). It's a bit hidden away but there is a scripting reference for 'set interval line properties' in the scripting index. 

 

You can also just skip the 'Get' function and take the values from the summary table generated in the report and write a quick If statement to test if there is a significant difference. For example in the image below, level C/A does not have a LCL (the left line on the interval) below zero (i.e. more than zero), so it stays red. Level B/A and C/B have LCL's that cross the interval line (i.e. less that zero) so they are blue. 

 

Ben_BarrIngh_0-1732020518231.png

 

 

 

“All models are wrong, but some are useful”
carole
Level III

Re: Get color of points from plotcolbox of oneway analysis table in JSL

Thank you for your answer.

Ok it's clear for your example of difference that should cross 0.

 

But could you help me to read this one below, that displays the values of standard deviation.

What is the reference to be crossed that makes the dots blue/red ?

What do you mean by reference line in PCB, what is "PCB" ?

 

carole_0-1732026300911.png

 

jthi
Super User

Re: Get color of points from plotcolbox of oneway analysis table in JSL

There is also << Get Primary Interval Line Properties (which doesn't really have any documentation)

Names Default To Here(1);
dt = Open("$SAMPLE_DATA/Big Class.jmp");
platoneway = Oneway(
	Y(:weight),
	X(:age),
	Each Pair(1),
	All Pairs(1),
	Comparison Circles(0),
	Means and Std Dev(1),
	Box Plots(1),
	Mean Diamonds(1),
	Mean Error Bars(1),
	Std Dev Lines(1),
	Comparison Circles(0),
	Grand Mean(0),
	SendToReport(
		Dispatch({"Means and Std Deviations"}, "Std Dev Lower 95%", NumberColBox,
			{Visibility("Visible")}
		),
		Dispatch({"Means and Std Deviations"}, "Std Dev Upper 95%", NumberColBox,
			{Visibility("Visible")}
		),
		Dispatch({"Means and Std Deviations"}, "~Std Dev", PlotColBox, {Visibility("Visible")}),
		Dispatch({}, "Means Comparisons", OutlineBox, {Close(1)})
	)
);

reponeway = platoneway << Report();
pcb = reponeway["Means and Std Deviations"][Plot Col Box(1)];
pcb << Get primary interval line properties;

You can try to extract the colors from that if really necessary

{3, 5, 3, 1, 1, 0, 5}

To understand what these mean, check Set primary interval line properties from scripting index

Syntax: obj << Set primary interval line properties( {color if upper < reference line, color if crosses reference line, color if lower > reference line, alpha, line width, pen style, cap length } )

You can find standard colors of JMP for example from here https://www.jmp.com/support/help/en/18.1/index.shtml#page/jmp/specify-colors-in-jmp-graphs.shtml

jthi_0-1732024939914.png

 

 

 

-Jarmo
carole
Level III

Re: Get color of points from plotcolbox of oneway analysis table in JSL

Ok thank you for the << Get Primary Interval Line Properties. I didn't know it.

It doesn't exist in JMP17.2, only in JMP18 but it's ok.

 

My problem is that it doesn't give me the list of levels in blue, and the list of levels in red.

For that I would like to have the value of reference line in the code below.

Is there a way to get that value please ?

Syntax: obj << Set primary interval line properties( {color if upper < reference line,