cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Choose Language Hide Translation Bar
Sukanyap
Level II

Changing length of whisker from 1.5 IQR to 3 IQR in box plot

Hi All,

I was finding if there is any way through which we can change the length of whisker in box plot. As of now in standard box plot in Graph builder of JMP the length of whisker of whisker is 1.5 IQR, say I want to change the length. I am not getting any such options to change the length of whisker.

Please let me know if anyone here knows about it.

 

Thanks !

2 REPLIES 2
txnelson
Super User

Re: Changing length of whisker from 1.5 IQR to 3 IQR in box plot

I am not aware of an option to change the whisker length of the box plot in JMP.  However, the JMP capability of being able to add graphics to the graphical output in JMP, would permit the calculation and displaying of whiskers of a different length.

 

Here is the start of how to approach the adding of new whiskers to a box plot.  The example is very hard wired, where a real script would have to calculate the 3.0 IQR and then draw the required lines.

txnelson_0-1680868349727.png

names default to here(1);
dt = 
// Open Data Table: Big Class.jmp
// → Data Table( "Big Class" )
Open( "$SAMPLE_DATA/Big Class.jmp" );

gb = Graph Builder(
	Variables( X( :sex ), Y( :height ) ),
	Elements( Box Plot( X, Y, Legend( 4 ) ) ),
	SendToReport(
		Dispatch(
			{},
			"400",
			ScaleBox,
			{Legend Model(
				4,
				Base( 1, 0, 0, Item ID( "height", 2 ) ),
				Properties(
					1,
					{Line Color( 3 ), Fill Color( 0 )},
					Item ID( "height", 2 )
				)
			)}
		),
		Dispatch(
			{},
			"Graph Builder",
			FrameBox,
			{DispatchSeg( Box Plot Seg( "Box Plot (F)" ), Fences( 0 ) ),
			DispatchSeg( Box Plot Seg( "Box Plot (M)" ), Fences( 0 ) )}
		)
	)
);

report(gb)[FrameBox(1)] << Add Graphics Script(
	line({0,63.5},{0,70});
	line({-.20,70},{.20,70});
);
Jim

Re: Changing length of whisker from 1.5 IQR to 3 IQR in box plot

There is no option to change the length of the whiskers because that is not how the box and whiskers plot is defined. Of course, you are free to create your own modification per @txnelson's instruction.