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
Tatsuya
Level I

Some Limit Lines on One Graph

Hello.
Thank you for JMP.
 
I know how to output a Spec limit Line in one graph when the column property is set to Spec limit.However, when two plots are plotted on one graph as shown below, the Spec limit Line is not displayed.
 
How to display some Spec limit Lines on one graph like Image?
Open( "$SAMPLE_DATA/Cars.jmp" );
Graph Builder(
	Variables(
		X( :Make ),
		Y( :Head IC ),
		Y( :Chest decel, Position( 1 ) ),
		Y( :L Leg, Position( 1 ) )
	),
	Elements( Points( X, Y( 1 ), Y( 2 ), Y( 3 ), Legend( 4 ) ) )
);
Note: spec limit is not set for this sample data
 
Thanks
Image-3.png
1 ACCEPTED SOLUTION

Accepted Solutions
txnelson
Super User

Re: Some Limit Lines on One Graph

@Mark_Bailey suggestion is correct.  There is also one additional item you need to be aware of, you can not label 2 reference lines the same.....which may actually be the underlining issue with not being able to graph 2 spec limits automatically.  However, below is a simple example of overcoming the issues

two.PNG

Names default to here(1);
dt = open("$SAMPLE_DATA/semiconductor capability.jmp");
gb = Graph Builder(
	Variables( X( :SITE ), Y( :PNP1 ), Y( :NPN2, Position( 1 ) ) ),
	Elements( Points( X, Y( 1 ), Y( 2 ), Legend( 19 ) ) ),
	SendToReport(
		Dispatch(
			{},
			"PNP1",
			ScaleBox,
			{Min( -275.218658892128 ), Max( 1128.57142857143 ), Inc( 200 ),
			Minor Ticks( 1 )}
		)
	)
);


axisbox = report(gb)[AxisBox(2)];
specs = dt:PNP1 << get property("Spec Limits");
axisbox << Add Ref Line( specs["LSL"], "Solid", blue, "LSL1", 2 );
axisbox << Add Ref Line( specs["USL"], "Solid", green, "USL1", 2 );

specs = dt:PNP2 << get property("Spec Limits");
axisbox << Add Ref Line( specs["LSL"], "Solid", red, "LSL2", 2 );
axisbox << Add Ref Line( specs["USL"], "Solid", yellow, "USL2", 2 );

 

Jim

View solution in original post

4 REPLIES 4

Re: Some Limit Lines on One Graph

You can only show one set of lines for specifications in one plot. You can stack the plots in Graph Builder, though. Then the individual sets of specifications are plotted. I verified this claim by adding Spec Limits property to the three data columns used in the Y role in this example.

 

dt = Open( "$SAMPLE_DATA/Cars.jmp" );

dt << Graph Builder(
	Size( 534, 464 ),
	Show Control Panel( 0 ),
	Show Legend( 0 ),
	Variables( X( :Make ), Y( :Chest decel ), Y( :L Leg ), Y( :L Leg ) ),
	Elements( Position( 1, 1 ), Points( X, Y, Legend( 6 ) ) ),
	Elements( Position( 1, 2 ), Points( X, Y, Legend( 7 ) ) ),
	Elements( Position( 1, 3 ), Points( X, Y, Legend( 8 ) ) )
);
Tatsuya
Level I

Re: Some Limit Lines on One Graph

Thanks,your reply.

 

To be honest, I want to see the change of measurement items in time by setting time on the horizontal axis and the same measurement items on the vertical axis.

And at that time, I want to set a different value for Spec limit at each time.

Can not this one?

Re: Some Limit Lines on One Graph

Alternatively, you would need to write a script to obtain the specification limits for each variable in the Y role and then add a set of reference lines to the vertical axis.

txnelson
Super User

Re: Some Limit Lines on One Graph

@Mark_Bailey suggestion is correct.  There is also one additional item you need to be aware of, you can not label 2 reference lines the same.....which may actually be the underlining issue with not being able to graph 2 spec limits automatically.  However, below is a simple example of overcoming the issues

two.PNG

Names default to here(1);
dt = open("$SAMPLE_DATA/semiconductor capability.jmp");
gb = Graph Builder(
	Variables( X( :SITE ), Y( :PNP1 ), Y( :NPN2, Position( 1 ) ) ),
	Elements( Points( X, Y( 1 ), Y( 2 ), Legend( 19 ) ) ),
	SendToReport(
		Dispatch(
			{},
			"PNP1",
			ScaleBox,
			{Min( -275.218658892128 ), Max( 1128.57142857143 ), Inc( 200 ),
			Minor Ticks( 1 )}
		)
	)
);


axisbox = report(gb)[AxisBox(2)];
specs = dt:PNP1 << get property("Spec Limits");
axisbox << Add Ref Line( specs["LSL"], "Solid", blue, "LSL1", 2 );
axisbox << Add Ref Line( specs["USL"], "Solid", green, "USL1", 2 );

specs = dt:PNP2 << get property("Spec Limits");
axisbox << Add Ref Line( specs["LSL"], "Solid", red, "LSL2", 2 );
axisbox << Add Ref Line( specs["USL"], "Solid", yellow, "USL2", 2 );

 

Jim