在控製圖中繪製下限/上限和平均值嗨,大家好,
我想知道是否可以直接在控製圖中(由控製圖生成器創建)而不是 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 線”。