cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • New to JMP? Join us Sept. 23-24 for the Early User Edition of Discovery Summit, tailor-made for new users. Register now for free!
  • Use World Cup data to build models, explore spatial relationships, and create informative visualizations in JMP. Register. July 17, 2 pm US Eastern Time.
  • Your voice matters! Tell us how you prefer to receive JMP updates, so we can tailor our communication to your needs. Take short survey.

Discussions

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

setting spec limit to column property by JSL - lines not shown on plot

Hi

 

I have a script that assigns spec limits (USL/LSL) to columns property, and then make a plot of the column, and I expect
to see the limits lines drawn on the plot. What happens is that the limits are set correctly in the table, but not visible on the plot.

If I draw the same plot to this column manually after running the script - no lines again.

If I open the column spec property window, I see the limits, the 'show reference line' is on.
only if I hit 'Apply' and then plot again - I can see the lines on the plot as expected. But I can't get it to work by script..

any idea?

(using JMP PRO 15)

 

shlomi_bakish_0-1644497880045.png

shlomi_bakish_1-1644497971080.png

 

 

11 REPLIES 11
txnelson
Super User

Re: setting spec limit to column property by JSL - lines not shown on plot

This JSL should do the trick

// Your code
datacolnames = res_thk_specs:colname << get values;
specExpr = Expr(
	Column( Res_Thk_Data, name ) <<
	Set Property(
		"Spec Limits",
		{LSL( Expr( lower ) ), USL( Expr( upper ) ),
		TARGET( Expr( target ) ), Show Limits( 1 )}
	)
);
				
For( i = 1, i <= N Rows( RES_THK_SPECS ), i++,
	name = Column( RES_THK_SPECS, "COLNAME" )[i];
	lower = Column( RES_THK_SPECS, "LSL" )[i];
	upper = Column( RES_THK_SPECS, "USL" )[i];
	target = Column( RES_THK_SPECS, "TARGET" )[i];
	_unit_ = Column( RES_THK_SPECS, "UOM" )[i];
				
	If( Contains( datacolnames, name ),
		Eval( Eval Expr( specExpr ) )
	);
	If( Contains( datacolnames, name ),
		Column( Res_Thk_Data, name ) << Set Property( "Units", eval( _unit_ ) )
	);
);
Jim
chris_dennis
Level III

Re: setting spec limit to column property by JSL - lines not shown on plot

Jim, thanks that did the trick.  

Recommended Articles