有人可以告訴我如何在 Jmp12 的置信區間圖和控製圖平均值中插入資料標籤嗎? 請參閱附圖以獲得更好的說明。

這是一個簡單的腳本,可以幫助您入門。它可以變得更加奇特,但這應該給你一個開始:
Names Default To Here( 1 );
dt = Current Data Table();
// Calculate the means so they can be displayed
Summarize( dt, bygroup = by( :Name( "Factor-1" ) ), themeans = Mean( :thickness ) );
// Run the basic graph builder code
gb = dt << Graph Builder(
Variables( X( :Name( "Factor-1" ) ), Y( :Thickness ) ),
Elements( Points( X, Y, Legend( 5 ), Summary Statistic( "Mean" ), Error Bars( "Confidence Interval" ) ) )
);
// Loop across the different factors and add the mean as a text
// Note, that because the x axis values are based upon a character column,
// the X position is 0 for the first group, 1 for the second, etc.
For( i = 1, i <= N Items( bygroup ), i++,
Eval(
Substitute(
Expr(
Report( gb )[framebox( 1 )] << add graphics script( Text( {__x__, __y__}, __mean__ ) )
),
Expr( __x__ ), i-1 + .1,
Expr( __y__ ), themeans[i],
Expr( __mean__ ), Char( Themeans[i] )
)
)
);New Table( "test",
Add Rows( 20 ),
New Column( "Factor-1",
Character,
"Nominal",
Set Values(
{"Factor 1", "Factor 1", "Factor 1", "Factor 1", "Factor 1", "Factor 1",
"Factor 1", "Factor 1", "Factor 1", "Factor 1", "Factor 2", "Factor 2",
"Factor 2", "Factor 2", "Factor 2", "Factor 2", "Factor 2", "Factor 2",
"Factor 2", "Factor 2"}
)
),
New Column( "Thickness",
Numeric,
"Continuous",
Format( "Best", 11 ),
Set Selected,
Set Values(
[1.50740933, 1.601142469, 1.074704843, 1.884292315, 1.012608931,
1.607336196, 1.832731982, 1.269104476, 1.652280427, 1.729379409,
0.195244429, 0.764830482, 0.401538929, 0.890074236, 0.395640352,
0.896762654, 0.389728401, 0.223935429, 0.165762602, 0.414394237]
)
),
Set Row States( [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] )
)我的錯......當前的討論論壇存在一個問題,您無法在最初的回復後附加一些內容。 您可以將其轉換為腳本嗎:
在資料表的“表面板”中的“來源”條目下,按一下它並選擇
“複製表格腳本”
然後點擊回覆中的「插入 JSL 程式碼」並將程式碼貼到其中
可以編寫一個腳本來處理該問題。可以計算摘要統計數據,然後可以將註釋新增到包含摘要資訊的圖表中
如果您有一些示例數據,我可以為您提供一個關於如何做到這一點的良好開端。
謝謝吉姆。
看起來我必須手動計算每個因素的統計數據並插入標題框中!
您是否想問如何以互動方式向圖表添加標籤?
由於「平均值」和「信賴區間」是計算值,因此您無法使用「行狀態標籤」選項來顯示這些值。 您可以右鍵單擊圖表,然後新增標題框,但是,顯示的統計資料是總體統計資料。 您需要做的是轉到繪圖工具並選擇一個文字輸入框,然後將其手動新增到圖表中。
