你好! 我有 JMP Pro 14。 我创建了几个箱线图,我想在其中显示 Q3 以上字母的类别之间的显着差异,如下图所示:

如何将字母 a 和 b 放在方框上方? 我的情节是这样的:

Mi Graph Builder代码是:
Graph Builder(
Size( 571, 448 ),
Show Control Panel( 0 ),
Show Legend( 0 ),
Show Title( 0 ),
Show Footer( 0 ),
Variables( X( :Cat ), Y( :Name( "Pl/min" ) ) ),
Elements( Box Plot( X, Y, Legend( 6 ), Box Style( "Solid" ) ) ),
SendToReport(
Dispatch(
{},
"Cat",
ScaleBox,
{Reversed Scale, Label Row(
{Set Font Size( 12 ), Tick Mark( Label( "6" ), Label( "6 " ) ),
Tick Mark( Label( "7" ), Label( "7 " ) )}
)}
),
Dispatch(
{},
"Pl/min",
ScaleBox,
{Min( 5.5 ), Max( 18 ), Inc( 2 ), Minor Ticks( 1 )}
),
Dispatch(
{},
"400",
ScaleBox,
{Legend Model(
6,
Properties(
0,
{Line Color( 32 ), Fill Color( 0 )},
Item ID( "Pl/min", 1 )
)
)}
),
Dispatch( {}, "X title", TextEditBox, {Set Font Size( 12 )} ),
Dispatch( {}, "Y title", TextEditBox, {Set Font Size( 12 )} ),
Dispatch(
{},
"Graph Builder",
FrameBox,
{DispatchSeg(
Box Plot Seg( "Box Plot (4)" ),
{Line Color( {128, 128, 128} ), Fill Color( "Medium Dark Red" )}
), DispatchSeg(
Box Plot Seg( "Box Plot (5)" ),
{Line Color( {128, 128, 128} ), Fill Color( "Medium Dark Yellow" )}
), DispatchSeg(
Box Plot Seg( "Box Plot (6)" ),
{Line Color( "Medium Dark Yellow" ),
Fill Color( "Medium Dark Green" )}
), DispatchSeg(
Box Plot Seg( "Box Plot (7)" ),
{Line Color( "Medium Dark Yellow" ),
Fill Color( "Medium Dark BlueCyan" )}
), DispatchSeg(
Box Plot Seg( "Box Plot (8)" ),
{Line Color( "Medium Dark Yellow" ),
Fill Color( "Medium Dark Magenta" )}
), DispatchSeg(
Box Plot Seg( "Box Plot (9)" ),
{Line Color( "Medium Dark Purple" ),
Fill Color( "Medium Dark Fuchsia" )}
)}
)
)
);提前致谢。
马加利。
我想你必须:
- 计算这些字母(基于我 5 秒的谷歌搜索,这些字母来自 Tukey 的测试,所以我只使用了一些连接字母报告)
- 创建新列,将这些字母映射到正确的行
- 使用该列作为标记
- 将点添加到图形构建器
- 对点图使用合适的汇总统计数据以在合适的位置显示它们(可能需要新列来创建一些偏移量)
- 标记应显示在图表中
您很可能还可以将步骤 2-6 合并到图形脚本中
这是使用非图形脚本选项的 Big Class 的相当简单的示例:
Names Default To Here(1);
dt = Open("$SAMPLE_DATA/Big Class.jmp");
fit = dt << Oneway(Y(:height), X(:age), All Pairs(1), invisible);
letters_tb = ((Report(fit)[OutlineBox("Connecting Letters Report")]) << child) << child;
tb_letter_cols = Filter Each({col_name}, letters_tb << Get Names,
Starts With(col_name, "~Letter Column ")
);
aa_letters = Associative Array();
For Each({level, idx}, letters_tb[1] << get,
aa_letters[level] = "";
For Each({letter_col, idx_col}, tb_letter_cols,
aa_letters[level] ||= letters_tb[1 + idx_col][idx];
);
);
fit << close window;
dt << New Column("TukeyLetters", Character, Nominal, UseForMarker(1), << Set Each Value(
aa_letters[char(:age)];
));
gb = dt << Graph Builder(
Size(529, 451),
Show Control Panel(0),
Variables(X(:age), Y(:height)),
Elements(
Box Plot(X, Y, Legend(6), Box Style("Solid"), Fences(0)),
Points(
X,
Y,
Legend(7),
Summary Statistic("Third Quartile"),
Error Interval("None")
)
)
);

编辑:
为此创建了愿望清单项目使用箱线图时在图形构建器中显示重要字母,在执行比较时以 x 拟合 y