有人可以告诉我如何在 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 代码”并将代码粘贴到其中
可以编写一个脚本来处理该问题。可以计算摘要统计数据,然后可以将注释添加到包含摘要信息的图表中
如果您有一些示例数据,我可以为您提供一个关于如何做到这一点的良好开端。
谢谢吉姆。
看起来我必须手动计算每个因素的统计数据并插入到标题框中!
您是否想问如何以交互方式向图表添加标签?
由于“平均值”和“置信区间”是计算值,因此您无法使用“行状态标签”选项来显示这些值。 您可以右键单击图表,然后添加标题框,但是,显示的统计数据是总体统计数据。 您需要做的是转到绘图工具并选择一个文本输入框,然后将其手动添加到图表中。
