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
mvanderaa1
Level IV

Graph builder box plot creates duplicate data points

I am trying to achieve a box plot graph where the confidence diamond and data points are shown in black, with the boxes itself using the color based on a column value. Additionally, I would like to show the raw data points with a jitter.

 

I am using a work-around suggested to me in a previous post:

How-to-change-all-box-plot-confidence-diamonds-colors-in-graph

 

That solution uses two multiple box plots on top of each other to allow for a different color for the box plot and its confidence diamond.

 

It mostly works, but the problem I still face is that potential outliers are now showing as two separate data points.

an example using big class.jmp

mvanderaa1_0-1730279321788.png

the code for this graph:

Graph Builder(
	Size( 1845, 897 ),
	Show Control Panel( 0 ),
	Variables( Y( :weight ), Group X( :sex ), Color( :sex ) ),
	Elements(
		Box Plot( Y, Legend( 7 ), Box Style( "Solid" ), Fences( 0 ) ),
		Points(
			Y,
			Color( 0 ),
			Legend( 6 ),
			Jitter( "Random Uniform" ),
			Jitter Limit( 0.3179 )
		),
		Box Plot( Y, Color( 0 ), Legend( 8 ), Confidence Diamond( 1 ) ),
		Bar( Y, Legend( 9 ), Bar Style( "Float" ), Label( "Label by Value" ) )
	),
	SendToReport(
		Dispatch( {}, "400", LegendBox,
			{Legend Position(
				{7, [-1, 0, 1, -3], 6, [-1], 8, [-3, -3], 9, [-3, -3]}
			)}
		)
	)
);

Is there a way to achieve this? I suppose it requires not drawing the box plot potential outlier, but I can imagine this is hard to do.

 

2 REPLIES 2
txnelson
Super User

Re: Graph builder box plot creates duplicate data points

The Jitter setting of "Random Uniform" appears to be the issue.  Change the setting to "Auto" and the jittering is there and without duplicate data points.  You need to contact JMP Support and put in the issue.  It seems to be a real Bug.

txnelson_0-1730282965846.png

Names Default To Here( 1 );
dt = 
// Open Data Table: Big Class.jmp
// → Data Table( "Big Class" )
Open( "$SAMPLE_DATA/Big Class.jmp" );

Graph Builder(
	Size( 1845, 897 ),
	Show Control Panel( 0 ),
	Variables( Y( :weight ), Group X( :sex ), Color( :sex ) ),
	Elements(
		Box Plot( Y, Legend( 7 ), Box Style( "Solid" ), Fences( 0 ) ),
		Points(
			Y,
			Color( 0 ),
			Legend( 6 ),
			Jitter( "Auto" ),
			Jitter Limit( 0.3179 )
		),
		Box Plot( Y, Color( 0 ), Legend( 8 ), Confidence Diamond( 1 ) ),
		Bar( Y, Legend( 9 ), Bar Style( "Float" ), Label( "Label by Value" ) )
	),
	SendToReport(
		Dispatch( {}, "400", LegendBox,
			{Legend Position(
				{7, [-1, 0, 1, -3], 6, [-1], 8, [-3, -3], 9, [-3, -3]}
			)}
		)
	)
);

   

Jim
mvanderaa1
Level IV

Re: Graph builder box plot creates duplicate data points

In case of jitter=auto, the data points simply overlap right?

 

Sadly I much prefer the "jitter=random uniform" aesthetics of the graphs.

 

I will contact JMP support regarding this issue.