cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • Learn how to build custom Python data connectors and further customize JMP’s Data Connector Framework with the Python Data Connector Demo, available now in the JMP Marketplace!
  • See how to create experiments to support product design and ID useful product features. Register for June 12 webinar, 2pm US Eastern Time.

Discussions

Solve problems, and share tips and tricks with other JMP users.
Choose Language Hide Translation Bar
Neo
Neo
Level VI

How to create Box Plots when 5 summary parameters (Min, Q1, Median Q3, Max) and Limits (LSL, USL) are in a column corresponding to a given part_ID?

My data table has got part_ID entries in column 1. In column 2, the 5 summary parameters - Min, Q1, Median Q3, Max  and the test limits LSL, USL appear. In column 1 the part ID is repeated 7 times (corresponding to 5 summary parameters + LSL & USL, total 7) after which the next part ID appears (and corresponding 7 numbers in column 2).

 

I do not want to change the format of the data table (i.e. do not want to transpose).

 

I want to create box plot trend chart (with part ID on X-axis) using the 5 summary parameters and the limits. How to do this via JSL?

When it's too good to be true, it's neither
21 REPLIES 21
jthi
Super User

Re: How to create Box Plots when 5 summary parameters (Min, Q1, Median Q3, Max) and Limits (LSL, USL) are in a column corresponding to a given part_ID?

Your jitter is set to None

jthi_0-1697727869185.png

 

which I guess means that there should be no random noise added

jthi_1-1697727926782.png

 

-Jarmo
Neo
Neo
Level VI

Re: How to create Box Plots when 5 summary parameters (Min, Q1, Median Q3, Max) and Limits (LSL, USL) are in a column corresponding to a given part_ID?

This additional script called by the earlier script (in this thread) does what I wanted. Script is specific to my data but shows a way to plot V Line () within a loop across different Frameboxes. 

Changing to BoxPlots on the Graphbuilder with Q1, Q2 and Median selected in the local data filter gets proper boxplots. V line () connects the Max and Min completing the anatomy of a box plot.  As only Q1, Q2 are selected and rest of the data ignored, I think one gets the correct box (selecting more parameters such as Min and Max in the local data filter gives incorrect box).

Names Default To Here (1);
Clear Log ();

setVLines_atMinMax = Function ( {gbr, FrameboxNo, PartNo, Min, Max}, {},

Eval(EvalExpr(gbr [Framebox (FrameboxNo)]<< Add graphics Script (
					V Line (Expr(PartNo-1), Expr(Min), Expr(Max));	
				)));
	
);

gbr = gb << report;

nParts =5;

nc = ncols (dt); //number of coulms in my data table

For (j =1, j <=(nc-1), j++,

    FrameboxNo  = j;
    
		for ( i = 1, i <= nParts, i++,

			ind = (7*i-3); //show (ind);
			ind_next = (7*i -3) + 1; //show (ind_next);

			PartNo = Num(:PartID[ind]); //show (PartNo);

			Min = Column(nc) [ind]; show (Min);
			Max = Column(nc) [ind_next]; show (Max);

			setVLines_atMinMax (gbr, FrameboxNo, PartNo, Min, Max); 
		
		);
		
	nc =  nc-1;
);
//show (FrameboxNo); show (nc);

 

Neo_2-1698149973903.png

 

 

When it's too good to be true, it's neither

Recommended Articles