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
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
CompleteLeopard
Level III

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

Recommended Articles