- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
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));
);
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
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));
);
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
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
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);
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
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));
);
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
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
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);