你好,
我正在編寫一個非常簡單的腳本來使用 Control Graph Builder。
運行下面的腳本後,我將在兩個不同的窗口中彈出 2 個圖表。
示例如下:
Control Chart Builder(
Size( 903, 464 ),
Show Control Panel( 0 ),
Variables(
Subgroup( :Name( "MoveOutTime" ) ),
Y( :Current1 )
),
Chart(
Position( 1 ),
Points( Individual Points( 1 ) ),
Limits( Sigma( "Moving Range" ), Zones( 1 ) ),
Warnings( Test Beyond Limits( 1 ) ),
Add Spec Limits( {LSL( 2.3 )} )
),
Chart(
Position( 2 ),
Points( Statistic( "Moving Range on Means" ), Individual Points( 1 ) ),
Limits( Sigma( "Moving Range" ), Zones( 1 ) ),
Warnings( Test Beyond Limits( 1 ) )
),
SendToReport(
Dispatch(
{},
"MoveOutTime",
ScaleBox,
{Min( -0.5 ), Max( 528.5 ), Interval( "Numeric" ), Inc( 0.5 ),
Minor Ticks( 0 )}
),
Dispatch(
{},
"Current1",
ScaleBox,
{Add Ref Line( 2.3, "Solid", "Blue", "LSL", 1 )}
),
Dispatch(
{},
"Current1 Limit Summaries",
OutlineBox,
{OutlineCloseOrientation( "Vertical" )}
)
)
);
Control Chart Builder(
Size( 903, 464 ),
Show Control Panel( 0 ),
Variables(
Subgroup( :Name( "MoveOutTime" ) ),
Y( :Current2 )
),
Chart(
Position( 1 ),
Points( Individual Points( 1 ) ),
Limits( Sigma( "Moving Range" ), Zones( 1 ) ),
Warnings( Test Beyond Limits( 1 ) ),
Add Spec Limits( {LSL( 3.1 )} )
),
Chart(
Position( 2 ),
Points( Statistic( "Moving Range on Means" ), Individual Points( 1 ) ),
Limits( Sigma( "Moving Range" ), Zones( 1 ) ),
Warnings( Test Beyond Limits( 1 ) )
),
SendToReport(
Dispatch(
{},
"MoveOutTime",
ScaleBox,
{Min( -0.5 ), Max( 528.5 ), Interval( "Numeric" ), Inc( 0.5 ),
Minor Ticks( 0 )}
),
Dispatch(
{},
"Current2",
ScaleBox,
{Add Ref Line( 3.1, "Solid", "Blue", "LSL", 1 )}
),
Dispatch(
{},
"Current2 Limit Summaries",
OutlineBox,
{OutlineCloseOrientation( "Vertical" )}
)
)
);
(1) 如何將這兩個圖放在一起,以便它們可以一起出現在 JMP 日誌中?
(2) 如果我有多個當前參數,我該怎麼辦 - 我應該如何循環所有這些參數,以便最終它們會出現在 JMP 日誌的同一窗口中?
預先感謝您的建議。
@馬克貝利的方法是可靠的。
我剛剛發了一個博客它使用了這個想法並將一些更大的圖形示例組裝成一個“儀表板”
1.我能想到幾種方法。
- 發送<< 期刊消息到每個單獨的平台。
- 將兩個響應都放在是啟動代碼的作用。
- 將上面的單獨啟動代碼放在新窗口(“圖表”,ccb1,ccb2)用作參數。
2.我沒有測試過這段代碼,但總體思路是分解固定部分(例如,建行表達式在這種情況下)和可變部分(例如,參數在這種情況下)。 使用表達式生成最終代碼,然後對其求值。
Names Default to Here( 1 );
column = List( /* a list of columns to chart */ );
ccb expr = Expr( Control Chart Builder( /* all arguments except for Y() */ ) );
y arg = Expr( Y() );
For( col = 1, col <= N Items( columns ), col++,
Insert Into( y arg, Column( column[col] ) );
);
Eval(
Insert( ccb expr, Name Expr)( y arg )
);