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 move from signal modeling to system modeling at the first JMP Aerospace Analytics webinar. Register. June 18, 1 p.m. US Eastern Time.

Discussions

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

Set Spec Limits to Display on Histogram

I have a function to set spec limits below and I would like to adapt this code, or add to it, to let me toggle displaying the lines on the histogram as is an option in the column properties menu as 'Show as Graph Reference Lines'

SetSpecLimits = function({c, lsl, usl, tar},
     cmd = Expr(c << SetProperty("Spec Limits", {LSL(expr(lsl)), USL(expr(usl)), Target(expr(tar))}));
     eval(evalexpr(cmd));
);
2 ACCEPTED SOLUTIONS

Accepted Solutions
Jemster
Level III

Re: Set Spec Limits to Display on Histogram

I altered my code to Show Limits

SetSpecLimits = function({c, lsl, usl, tar},
     cmd = Expr(c << SetProperty("Spec Limits", {LSL(expr(lsl)), USL(expr(usl)), Target(expr(tar)),Show Limits(1)}));
     eval(evalexpr(cmd));
);

View solution in original post

jthi
Super User

Re: Set Spec Limits to Display on Histogram

Not exactly sure how you would like it to work, but you could add Show Limits to the function.

Change Spec Limits column properties manually and enable "Show as Graph Reference Lines", then copy the script from Enhanced Log or from Copy Table Script (no data) for table or from column properties. Then modify your function accordingly

 

View more...
Names Default To Here(1);

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

SetSpecLimits = function({c, lsl, usl, tar, s = 1}, {Default Local},
    cmd = Expr(c << SetProperty("Spec Limits", 
		{LSL(expr(lsl)), USL(expr(usl)), Target(expr(tar)), Show Limits(Expr(s))}
	));
    eval(evalexpr(cmd));
);

SetSpecLimits(Column(dt, "height"), 60, 70, 65, 1);
SetSpecLimits(Column(dt, "weight"), 60, 70, 65, 0);
-Jarmo

View solution in original post

2 REPLIES 2
Jemster
Level III

Re: Set Spec Limits to Display on Histogram

I altered my code to Show Limits

SetSpecLimits = function({c, lsl, usl, tar},
     cmd = Expr(c << SetProperty("Spec Limits", {LSL(expr(lsl)), USL(expr(usl)), Target(expr(tar)),Show Limits(1)}));
     eval(evalexpr(cmd));
);
jthi
Super User

Re: Set Spec Limits to Display on Histogram

Not exactly sure how you would like it to work, but you could add Show Limits to the function.

Change Spec Limits column properties manually and enable "Show as Graph Reference Lines", then copy the script from Enhanced Log or from Copy Table Script (no data) for table or from column properties. Then modify your function accordingly

 

View more...
Names Default To Here(1);

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

SetSpecLimits = function({c, lsl, usl, tar, s = 1}, {Default Local},
    cmd = Expr(c << SetProperty("Spec Limits", 
		{LSL(expr(lsl)), USL(expr(usl)), Target(expr(tar)), Show Limits(Expr(s))}
	));
    eval(evalexpr(cmd));
);

SetSpecLimits(Column(dt, "height"), 60, 70, 65, 1);
SetSpecLimits(Column(dt, "weight"), 60, 70, 65, 0);
-Jarmo

Recommended Articles