在控制图中绘制下限/上限和平均值嗨,大家好,
我想知道是否可以直接在控制图中(由控制图生成器创建)而不是 Show Limit Summaries 表中绘制 lower 、 upper 和 average 值。
谢谢。
回复:在控制图中绘制下限/上限和平均值谢谢你,吉姆。 现在可以用了!回复:在控制图中绘制下限/上限和平均值“Summarize()”函数的语法在最新版本的 JMP 中发生了变化。 看来这可能是问题所在。 更改声明
总结(dt,byPhase = by(:MyPhase));
到
总结(byPhase = by(:MyPhase));
回复:在控制图中绘制下限/上限和平均值谢谢你。 我检查了英文泡菜样本数据仍然没有成功。 在我运行 Summarize( dt/*###*/, byPhase = by( :MyPhase ) ) 后,我逐步运行脚本并获得以下报告。 我帮你把日志翻译成英文。 你相信那里有什么不对吗?
必须是赋值运算符 正在访问或计算“dt”, dt/*###*/
访问“dt”时必须使用赋值运算符
在下面脚本中,使用/*###*/ 标记错误
在以下脚本中,使用 /*###*/ 标记错误
回复:在控制图中绘制下限/上限和平均值该脚本正在寻找一个特定的大纲框,其英文标题为“Individual Measurement of Acid”。你的输出显然不是英文的。下面的脚本更改了对 Outline Box(2) 的引用。这是对轮廓框的绝对参考,而“酸的单独测量”是相对参考。您也可以尝试将“Individual Measurement of Acid”替换为

Names Default To Here( 1 );
// Open the sample data table
dt = Open( "$SAMPLE_DATA\Quality Control\Pickles.jmp" );
// There isn't an adequate column to be used as a Phase column in the sample
// data table, so create one
dt << New Column( "MyPhase", character, formula( Char( Floor( Row() / 13 + 1 ) ) ) );
// Run the control Chart
ct = dt << Control Chart(
Phase( :MyPhase ),
Group Size( 1 ),
KSigma( 3 ),
Chart Col( :Acid, Individual Measurement( Phase Level( "1" ), Phase Level( "2" ) ), Moving Range( Phase Level( "1" ), Phase Level( "2" ) ) )
);
// Create a list called byPhase of the each of the Phase values
Summarize( dt, byPhase = by( :MyPhase ) );
// Find the max row for each phase to determine the X position on the chart
// for the placement of the text values
PhaseMaxRowList = {};
For( i = 1, i <= N Items( byPhase ), i++,
Insert Into( PhaseMaxRowList, Max( dt << get rows where( :MyPhase == byPhase[i] ) ) )
);
// Add the text to the chart
framebox = Report( ct )[frame box( 1 )];
addTxt = Expr(
framebox << Add Graphics Script(
Description( scriptNameTBD ),
Text Color( "Black" );
Text( Center Justified, {xTBD - 2, yTBD + .1}, txtTBD );
);
);
// Loop across the phases and add the 3 text values by pulling their values from the table
// and reformating the values
For( i = 1, i <= N Items( byPhase ), i++,
LCL = (Report( ct )[Outline Box(2)][Number Col Box( i )] << get)[1];
LCLtxt = "LCL=" || Format( LCL, "Fixed Dec", 5, 2 );
Avg = (Report( ct )[Outline Box(2)][Number Col Box( i + N Items( byPhase ) )] << get)[1];
Avgtxt = "Avg=" || Format( Avg, "Fixed Dec", 5, 2 );
UCL = (Report( ct )[Outline Box(2)][Number Col Box( i + (N Items( byPhase ) * 2) )] << get)[1];
UCLtxt = "UCL=" || Format( UCL, "Fixed Dec", 5, 2 );
// Use a separate graphics script for each annotation so that they are more easily moved 'by hand'
Eval(Substitute(NameExpr(addTxt), Expr(scriptNameTBD), "LCL Text "||Char(i), Expr(xTBD), PhaseMaxRowList[i], Expr(yTBD), LCL, Expr(txtTBD), LCLtxt));
Eval(Substitute(NameExpr(addTxt), Expr(scriptNameTBD), "Avg Text "||Char(i), Expr(xTBD), PhaseMaxRowList[i], Expr(yTBD), Avg, Expr(txtTBD), Avgtxt));
Eval(Substitute(NameExpr(addTxt), Expr(scriptNameTBD), "UCL Text "||Char(i), Expr(xTBD), PhaseMaxRowList[i], Expr(yTBD), UCL, Expr(txtTBD), UCLtxt));
);回复:在控制图中绘制下限/上限和平均值JSL 与您之前发布的相同。 您可以在此处找到表格图片。 如您所见,尚未添加 LCL、UCL 和 Average 的文本。
谢谢。
回复:在控制图中绘制下限/上限和平均值我无法访问 JMP 11 或 Mac,因此我需要您的帮助。 该消息指向一段代码,该代码正在尝试从显示的输出表中读取 LCL。 您能否提供由包含限制的控制图生成的表格的图像?
回复:在控制图中绘制下限/上限和平均值我在我的 Mac JMP 11 上试用了 JSL。 然而,似乎文本已成功添加到图表中。 在日志窗口中,我得到以下错误信息并表示无法计算出下标。 你能给我解释一下吗?
For( i = 1, i <= N Items( byPhase ), i++,
LCL = (Report( ct )[/*###*/"单独测酸"][编号Col Box( i )
] << 得到)[1];
回复:在控制图中绘制下限/上限和平均值@ian_jmp
非常好的补充!
回复:在控制图中绘制下限/上限和平均值非常好的吉姆!
我冒昧地添加到您的代码中,以便每个注释都有一个单独的图形脚本:

这使得可以“手动”移动注释以避免任何冲突(右键单击图形框,选择“自定义”并根据需要编辑脚本中的 x 和 y 值)。
Names Default To Here( 1 );
// Open the sample data table
dt = Open( "$SAMPLE_DATA\Quality Control\Pickles.jmp" );
// There isn't an adequate column to be used as a Phase column in the sample
// data table, so create one
dt << New Column( "MyPhase", character, formula( Char( Floor( Row() / 13 + 1 ) ) ) );
// Run the control Chart
ct = dt << Control Chart(
Phase( :MyPhase ),
Group Size( 1 ),
KSigma( 3 ),
Chart Col( :Acid, Individual Measurement( Phase Level( "1" ), Phase Level( "2" ) ), Moving Range( Phase Level( "1" ), Phase Level( "2" ) ) )
);
// Create a list called byPhase of the each of the Phase values
Summarize( dt, byPhase = by( :MyPhase ) );
// Find the max row for each phase to determine the X position on the chart
// for the placement of the text values
PhaseMaxRowList = {};
For( i = 1, i <= N Items( byPhase ), i++,
Insert Into( PhaseMaxRowList, Max( dt << get rows where( :MyPhase == byPhase[i] ) ) )
);
// Add the text to the chart
framebox = Report( ct )[frame box( 1 )];
addTxt = Expr(
framebox << Add Graphics Script(
Description( scriptNameTBD ),
Text Color( "Black" );
Text( Center Justified, {xTBD - 2, yTBD + .1}, txtTBD );
);
);
// Loop across the phases and add the 3 text values by pulling their values from the table
// and reformating the values
For( i = 1, i <= N Items( byPhase ), i++,
LCL = (Report( ct )["Individual Measurement of Acid"][Number Col Box( i )] << get)[1];
LCLtxt = "LCL=" || Format( LCL, "Fixed Dec", 5, 2 );
Avg = (Report( ct )["Individual Measurement of Acid"][Number Col Box( i + N Items( byPhase ) )] << get)[1];
Avgtxt = "Avg=" || Format( Avg, "Fixed Dec", 5, 2 );
UCL = (Report( ct )["Individual Measurement of Acid"][Number Col Box( i + (N Items( byPhase ) * 2) )] << get)[1];
UCLtxt = "UCL=" || Format( UCL, "Fixed Dec", 5, 2 );
// Use a separate graphics script for each annotation so that they are more easily moved 'by hand'
Eval(Substitute(NameExpr(addTxt), Expr(scriptNameTBD), "LCL Text "||Char(i), Expr(xTBD), PhaseMaxRowList[i], Expr(yTBD), LCL, Expr(txtTBD), LCLtxt));
Eval(Substitute(NameExpr(addTxt), Expr(scriptNameTBD), "Avg Text "||Char(i), Expr(xTBD), PhaseMaxRowList[i], Expr(yTBD), Avg, Expr(txtTBD), Avgtxt));
Eval(Substitute(NameExpr(addTxt), Expr(scriptNameTBD), "UCL Text "||Char(i), Expr(xTBD), PhaseMaxRowList[i], Expr(yTBD), UCL, Expr(txtTBD), UCLtxt));
);
回复:在控制图中绘制下限/上限和平均值这是一个非常粗略的脚本,它将从限制表中提取值,并将它们放在图表上。 我建议您花时间使用下面的代码阅读脚本指南,以准确了解代码的工作原理。
帮助==>书籍==>脚本指南

Names Default To Here( 1 );
// Open the sample data table
dt = Open( "$SAMPLE_DATA\Quality Control\Pickles.jmp" );
// There isn't an adequate column to be used as a Phase column in the sample
// data table, so create one
dt << New Column( "MyPhase", character, formula( Char( Floor( Row() / 13 + 1 ) ) ) );
// Run the control Chart
ct = dt << Control Chart(
Phase( :MyPhase ),
Group Size( 1 ),
KSigma( 3 ),
Chart Col( :Acid, Individual Measurement( Phase Level( "1" ), Phase Level( "2" ) ), Moving Range( Phase Level( "1" ), Phase Level( "2" ) ) )
);
// Create a list called byPhase of the each of the Phase values
Summarize( dt, byPhase = by( :MyPhase ) );
// Find the max row for each phase to determine the X position on the chart
// for the placement of the text values
PhaseMaxRowList = {};
For( i = 1, i <= N Items( byPhase ), i++,
Insert Into( PhaseMaxRowList, Max( dt << get rows where( :MyPhase == byPhase[i] ) ) )
);
// Add the text to the chart
framebox = Report( ct )[frame box( 1 )];
framebox << Add Graphics Script(
Text Color( "Black" );
// Loop across the phases and add the 3 text values by pulling their values from the table
// and reformating the values
For( i = 1, i <= N Items( byPhase ), i++,
LCL = (Report( ct )["Individual Measurement of Acid"][Number Col Box( i )] << get)[1];
LCLtxt = "LCL=" || Format( LCL, "Fixed Dec", 5, 2 );
Avg = (Report( ct )["Individual Measurement of Acid"][Number Col Box( i + N Items( byPhase ) )] << get)[1];
Avgtxt = "Avg=" || Format( Avg, "Fixed Dec", 5, 2 );
UCL = (Report( ct )["Individual Measurement of Acid"][Number Col Box( i + (N Items( byPhase ) * 2) )] << get)[1];
UCLtxt = "UCL=" || Format( UCL, "Fixed Dec", 5, 2 );
Text( Center Justified, {PhaseMaxRowList[i] - 2, LCL + .1}, LCLtxt );
Text( Center Justified, {PhaseMaxRowList[i] - 2, Avg + .1}, Avgtxt );
Text( Center Justified, {PhaseMaxRowList[i] - 2, UCL + .1}, UCLtxt );
);
);回复:在控制图中绘制下限/上限和平均值你好,我们又见面了,
所以,我过去使用的旧软件是 Minitab。
回答你的问题,这些值是从软件自动绘制的,也是按阶段绘制的(见下图)。
在我之前分享的示例中,没有阶段。
我知道我问的太多了,但是你能告诉我如何使用脚本来包含这些操作(删除图表中的表格和绘图值)吗?
再次感谢。

回复:在控制图中绘制下限/上限和平均值这些值可以添加到图表中。 如果没有阶段,则值显示为图表的一部分

但是如果数据有阶段,那么正如您所指出的那样,这些值位于图表旁边的表格中,并且您希望它们出现在图表上。 如果您的旧软件允许您手动添加值,那么您只需在图表上添加注释即可在 JMP 中执行相同操作

如果您需要以编程方式完成此操作,则可以使用脚本简单地从显示的表格中读取值并将其放置到 IR 图表上。
我注意到在您旧软件的示例中,只显示了一组限制,即使看起来有不同的阶段。 那是因为所有阶段的限制都相同吗?
回复:在控制图中绘制下限/上限和平均值我是那个误会的人。 这个话题出现了前.
回复:在控制图中绘制下限/上限和平均值
您好,感谢您的快速回答。
我想我的解释不是很清楚。 我需要绘制较低、较高和平均线的值。
请参阅下面我正在寻找的示例。 左边是我以前用过的软件。
如果我可以绘制 Show Summaries Limits 表中的值,我可以删除要报告的表(放在演示文稿中的最佳布局)。

回复:在控制图中绘制下限/上限和平均值您可以双击垂直轴并添加参考线,或者通过右键单击它来将自定义图形脚本添加到图形框。 对于第二个选项,执行“帮助 > 脚本索引”并搜索“H 线”。