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