cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Try the Materials Informatics Toolkit, which is designed to easily handle SMILES data. This and other helpful add-ins are available in the JMP® Marketplace
Choose Language Hide Translation Bar
AlphaColt356
Level I

How to set different Spec lines for different projects in the graph builder

How to set different Spec lines for different projects in the graph builder, like this.

AlphaColt356_0-1654309136829.png

 

1 ACCEPTED SOLUTION

Accepted Solutions
txnelson
Super User

Re: How to set different Spec lines for different projects in the graph builder

Here is a partial script to solve what you want.  I have only displayed 2 of the Spec limits lines, but the addition of the other lines is just a repeat of the JSL, just changing the coordinates and text.

txnelson_0-1654313199591.png

 

Names Default To Here( 1 );
dt = Current Data Table();
gb = Graph Builder(
	Size( 528, 448 ),
	Show Control Panel( 0 ),
	Variables( X( :Label ), Y( :Data ), Color( :Label ) ),
	Elements( Box Plot( X, Y, Legend( 11 ) ), Contour( X, Y, Legend( 12 ) ) ),
	SendToReport(
		Dispatch(
			{},
			"Data",
			ScaleBox,
			{Format( "Best", 12 ), Min( -86.4411315121441 ), Max( 58.2086540147458 ), Inc( 20 ),
			Minor Ticks( 1 )}
		)
	)
);
Report( gb )[framebox( 1 )] << add graphics script(
	Pen Color( "blue" );
	Line( [-.5 .5], [-45 -45] );
	Text( {-.45, -40, 0, -42}, "LCL -45" );
	Line( [.5 1.5], [-50 -50] );
	Text( {.55, -45, 1, -47}, "LCL 50" );
);
Jim

View solution in original post

3 REPLIES 3
txnelson
Super User

Re: How to set different Spec lines for different projects in the graph builder

Here is a partial script to solve what you want.  I have only displayed 2 of the Spec limits lines, but the addition of the other lines is just a repeat of the JSL, just changing the coordinates and text.

txnelson_0-1654313199591.png

 

Names Default To Here( 1 );
dt = Current Data Table();
gb = Graph Builder(
	Size( 528, 448 ),
	Show Control Panel( 0 ),
	Variables( X( :Label ), Y( :Data ), Color( :Label ) ),
	Elements( Box Plot( X, Y, Legend( 11 ) ), Contour( X, Y, Legend( 12 ) ) ),
	SendToReport(
		Dispatch(
			{},
			"Data",
			ScaleBox,
			{Format( "Best", 12 ), Min( -86.4411315121441 ), Max( 58.2086540147458 ), Inc( 20 ),
			Minor Ticks( 1 )}
		)
	)
);
Report( gb )[framebox( 1 )] << add graphics script(
	Pen Color( "blue" );
	Line( [-.5 .5], [-45 -45] );
	Text( {-.45, -40, 0, -42}, "LCL -45" );
	Line( [.5 1.5], [-50 -50] );
	Text( {.55, -45, 1, -47}, "LCL 50" );
);
Jim

Re: How to set different Spec lines for different projects in the graph builder

How to change the line width?

Line( [-.5 .5], [-45 -45] );

 

jthi
Super User

Re: How to set different Spec lines for different projects in the graph builder

If you can add limits to your data this way:

jthi_4-1654326223888.png

you can add second graph to graph builder. If you want labels I think float bar chart is easiest (but try other visualizations also!). Building these can be sometimes a bit annoying, but the important parts are highlighted here:

jthi_3-1654326175617.png

Building the graph this way does have its benefits especially if you have local data filters

-Jarmo