我之前忽略的一件事是透過選擇要標記的行並轉到“行”>“標記/取消標記”來向各個點添加標籤。這應該使您能夠在此圖中執行您想要的操作。我基本上重新建立了您的範例(除了沒有誤差線),但我必須一次記錄 1 個圖,因為我需要更改每個面板的標籤。
最終結果如下:

我正在附加日誌文件,但有一個令人沮喪的錯誤,在保存並重新打開日誌後,自訂行設定會變得混亂。您可能會注意到,當您打開它時,所有線條都會變成虛線。
資料表腳本(同樣,不能直接附加資料表):
New Table( "Multipanel Example with Tukey labels",
Add Rows( 4 ),
Set Header Height( 59 ),
New Script(
"Growth",
Graph Builder(
Size( 518, 446 ),
Show Control Panel( 0 ),
Show Legend( 0 ),
Variables(
X( :Treatment ),
Y( :Growth ),
Overlay( :Temperature Regime )
),
Elements(
Line( X, Y, Legend( 10 ) ),
Points( X, Y, Legend( 11 ), Jitter( "None" ) )
),
SendToReport(
Dispatch(
{},
"Growth",
ScaleBox,
{Format( "Fixed Dec", 12, 1 ), Min( 0.4 ), Max( 0.9 ),
Inc( 0.1 ), Minor Ticks( 0 )}
),
Dispatch(
{},
"400",
ScaleBox,
{Legend Model(
10,
Properties(
0,
{Line Color( 0 ), Line Style( "Dotted" ),
Fill Color( 0 )},
Item ID( "1", 1 )
),
Properties(
1,
{Line Color( 0 ), Fill Color( 0 )},
Item ID( "2", 1 )
)
), Legend Model(
11,
Properties(
0,
{Line Color( 0 ), Fill Color( 0 )},
Item ID( "1", 1 )
),
Properties(
1,
{Line Color( 0 ), Fill Color( 0 )},
Item ID( "2", 1 )
)
)}
),
Dispatch( {}, "graph title", TextEditBox, {Set Text( "" )} ),
Dispatch( {}, "X title", TextEditBox, {Set Text( "" )} )
)
)
),
New Script(
"chlorophyll",
Graph Builder(
Size( 518, 446 ),
Show Control Panel( 0 ),
Show Legend( 0 ),
Variables(
X( :Treatment ),
Y( :chlorophyll a ),
Overlay( :Temperature Regime )
),
Elements(
Points( X, Y, Legend( 6 ), Jitter( "None" ) ),
Line( X, Y, Legend( 7 ) )
),
SendToReport(
Dispatch(
{},
"chlorophyll a",
ScaleBox,
{Format( "Fixed Dec", Use thousands separator( 1 ), 12, 0 ),
Min( 0 ), Max( 8 ), Inc( 2 ), Minor Ticks( 0 )}
),
Dispatch(
{},
"400",
ScaleBox,
{Legend Model(
6,
Properties(
0,
{Line Color( 0 ), Fill Color( 0 )},
Item ID( "1", 1 )
),
Properties(
1,
{Line Color( 0 ), Fill Color( 0 )},
Item ID( "2", 1 )
)
), Legend Model(
7,
Properties(
0,
{Line Color( 0 ), Line Style( "Dotted" ),
Fill Color( 0 )},
Item ID( "1", 1 )
),
Properties(
1,
{Line Color( 0 ), Fill Color( 0 )},
Item ID( "2", 1 )
)
)}
),
Dispatch( {}, "graph title", TextEditBox, {Set Text( "" )} ),
Dispatch( {}, "X title", TextEditBox, {Set Text( "" )} ),
Dispatch(
{},
"Graph Builder",
FrameBox,
{DispatchSeg(
Marker Seg( "Marker (1)" ),
label offset( {0, -8, -13}, {1, -12, 26} )
), DispatchSeg(
Marker Seg( "Marker (2)" ),
label offset( {0, -5, 21}, {1, -14, -16} )
)}
)
)
)
),
New Script(
"Symbiodinium density",
Graph Builder(
Size( 518, 446 ),
Show Control Panel( 0 ),
Show Legend( 0 ),
Variables(
X( :Treatment ),
Y( :Symbiodinium density ),
Overlay( :Temperature Regime )
),
Elements(
Points( X, Y, Legend( 4 ), Jitter( "None" ) ),
Line( X, Y, Legend( 5 ) )
),
SendToReport(
Dispatch(
{},
"Symbiodinium density",
ScaleBox,
{Min( 1.5 ), Max( 4 ), Inc( 0.5 ), Minor Ticks( 0 )}
),
Dispatch(
{},
"400",
ScaleBox,
{Legend Model(
4,
Properties(
0,
{Line Color( 0 ), Fill Color( 0 )},
Item ID( "1", 1 )
),
Properties(
1,
{Line Color( 0 ), Fill Color( 0 )},
Item ID( "2", 1 )
)
), Legend Model(
5,
Properties(
0,
{Line Color( 0 ), Line Style( "Dotted" ),
Fill Color( 0 )},
Item ID( "1", 1 )
),
Properties(
1,
{Line Color( 0 ), Fill Color( 0 )},
Item ID( "2", 1 )
)
)}
),
Dispatch( {}, "graph title", TextEditBox, {Set Text( "" )} ),
Dispatch( {}, "X title", TextEditBox, {Set Text( "" )} ),
Dispatch(
{},
"Graph Builder",
FrameBox,
{DispatchSeg(
Marker Seg( "Marker (1)" ),
label offset( {0, 2, 24}, {1, -3, -16} )
), DispatchSeg(
Marker Seg( "Marker (2)" ),
label offset( {0, 3, -15}, {1, 1, 24} )
)}
)
)
)
),
New Script(
"max dark-adapted",
Graph Builder(
Size( 518, 446 ),
Show Control Panel( 0 ),
Show Legend( 0 ),
Variables(
X( :Treatment ),
Y( :Name( "max. dark-adapted quantum yield" ) ),
Overlay( :Temperature Regime )
),
Elements(
Points( X, Y, Legend( 3 ), Jitter( "None" ) ),
Line( X, Y, Legend( 4 ) )
),
SendToReport(
Dispatch(
{},
"max. dark-adapted quantum yield",
ScaleBox,
{Min( 0.72 ), Max( 0.77 ), Inc( 0.01 ), Minor Ticks( 1 )}
),
Dispatch(
{},
"400",
ScaleBox,
{Legend Model(
3,
Properties(
0,
{Line Color( 0 ), Fill Color( 0 )},
Item ID( "1", 1 )
),
Properties(
1,
{Line Color( 0 ), Fill Color( 0 )},
Item ID( "2", 1 )
)
), Legend Model(
4,
Properties(
0,
{Line Color( 0 ), Line Style( "Dotted" ),
Fill Color( 0 )},
Item ID( "1", 1 )
),
Properties(
1,
{Line Color( 0 ), Fill Color( 0 )},
Item ID( "2", 1 )
)
)}
),
Dispatch( {}, "graph title", TextEditBox, {Set Text( "" )} ),
Dispatch( {}, "X title", TextEditBox, {Set Text( "" )} ),
Dispatch(
{},
"Graph Builder",
FrameBox,
{DispatchSeg(
Marker Seg( "Marker (1)" ),
label offset( {0, -4, -17}, {1, -6, -18} )
), DispatchSeg(
Marker Seg( "Marker (2)" ),
label offset( {0, -7, -14}, {1, -4, -17} )
)}
)
)
)
),
New Column( "Treatment",
Character,
"Nominal",
Set Property( "Value Ordering", {"upwelling", "non-upwelling"} ),
Set Values( {"upwelling", "upwelling", "non-upwelling", "non-upwelling"} ),
Set Display Width( 132 )
),
New Column( "Temperature Regime",
Numeric,
"Nominal",
Format( "Best", 12 ),
Set Values( [1, 2, 1, 2] )
),
New Column( "Growth",
Numeric,
"Continuous",
Format( "Best", 12 ),
Set Values( [0.78, 0.75, 0.68, 0.82] )
),
New Column( "Symbiodinium density",
Numeric,
"Continuous",
Format( "Best", 12 ),
Set Values( [2.8, 3.05, 3.45, 3.38] )
),
New Column( "Tukey Symbiodinium",
Character,
"Nominal",
Set Values( {"B", "B", "A", "A"} )
),
New Column( "chlorophyll a",
Numeric,
"Continuous",
Format( "Best", 12 ),
Set Values( [7.2, 4.3, 5.5, 6.5] )
),
New Column( "Tukey chlorophyll",
Character,
"Nominal",
Set Values( {"A", "C", "BC", "AB"} )
),
New Column( "max. dark-adapted quantum yield",
Numeric,
"Continuous",
Format( "Best", 12 ),
Set Values( [0.76, 0.749, 0.753, 0.739] ),
Set Display Width( 148 )
),
New Column( "Tukey max",
Character,
"Nominal",
Set Values( {"A", "B", "B", "C"} )
),
Set Row States( [32776, 248, 32776, 248] ),
Set Label Columns( :Tukey max )
)我認為這是可能的,不需要太多的工作,也不需要編寫腳本。基本概念是從 Tukey 連接字母報告建立一個資料表,並將這些字母連接到將群組名稱與 Tukey 表中的層級列相符的原始資料。然後,透過選擇它們 > 右鍵單擊任何突出顯示的列 > 新公式列 > 連接(使用空格或逗號),將列與字母組組合起來。接下來,選擇結果列並將其用作標籤(列 > 標籤/取消標籤)。
最後,在圖形產生器中繪製圖形。製作長條圖後,我可以使用長條圖的控制面板控制項來新增誤差條和標籤,如您所示。
**社群不允許我發布該表格(「附件的內容與其文件類型不符」)。這是重現它的腳本:
New Table( "ExamplePlotTukeyLabels",
Add Rows( 17 ),
New Script(
"Source",
Data Table( "Untitled 4" ) << Join(
With( Data Table( "Untitled 6" ) ),
By Matching Columns( :Groups = :Level ),
Drop multiples( 0, 0 ),
Include Nonmatches( 0, 0 ),
Preserve main table order( 1 )
)
),
New Script(
"Make Into Data Table",
Names Default To Here( 1 );
platform = Current Data Table() << Oneway(
Y( :Y ),
X( :Groups ),
All Pairs( 1 )
);
Wait( 0 );
Report( platform )[Outline Box( "Oneway Analysis of Y By Groups" )][
Outline Box( "Means Comparisons" )][
Outline Box( "Comparisons for all pairs using Tukey-Kramer HSD" )][
Outline Box( "Connecting Letters Report" )][Table Box( 1 )] <<
Make Into Data Table;
Report( platform ) << Close Window;
),
New Script(
"Example with Tukey Levels",
Graph Builder(
Size( 518, 550 ),
Show Control Panel( 0 ),
Variables( X( :Groups ), Y( :Y ) ),
Elements(
Bar(
X,
Y,
Legend( 4 ),
Error Bars( "Standard Error" ),
Label( "Label by Row" )
)
)
)
),
New Column( "Groups",
Character,
"Nominal",
Set Values(
{"Group 1", "Group 1", "Group 1", "Group 1", "Group 1", "Group 2",
"Group 2", "Group 2", "Group 2", "Group 2", "Group 3", "Group 3",
"Group 3", "Group 3", "Group 3", "Group 4", "Group 4"}
)
),
New Column( "Y",
Numeric,
"Continuous",
Format( "Best", 12 ),
Formula(
Random Normal( 15, 3 ) + Col Mean( Random Normal( 0, 10 ), :Groups )
),
Suppress Eval
),
New Column( "Level",
Character,
"Nominal",
Set Values(
{"A", "A", "A", "A", "A", "B", "B", "B", "B", "B", "C", "C", "C", "C",
"C", "D", "D"}
)
),
New Column( "~Letter Column A",
Character,
"Nominal",
Set Values(
{"", "", "", "", "", "A", "A", "A", "A", "A", "", "", "", "", "", "A",
"A"}
)
),
New Column( "~Letter Column B",
Character,
"Nominal",
Set Values(
{"B", "B", "B", "B", "B", "", "", "", "", "", "B", "B", "B", "B", "B",
"B", "B"}
)
),
New Column( "Concatenate[~Le...etter Column B]",
Character,
"Nominal",
Formula( :Name( "~Letter Column A" ) || " " || :Name( "~Letter Column B" ) )
),
New Column( "Mean",
Numeric,
"Continuous",
Format( "Fixed Dec", 12, 6 ),
Set Values(
[12.8498772929854, 12.8498772929854, 12.8498772929854, 12.8498772929854,
12.8498772929854, 19.105279210907, 19.105279210907, 19.105279210907,
19.105279210907, 19.105279210907, 11.7021088825322, 11.7021088825322,
11.7021088825322, 11.7021088825322, 11.7021088825322, 16.4722902997683,
16.4722902997683]
)
),
Set Label Columns( :Name( "Concatenate[~Le...etter Column B]" ) )
)