我敢肯定,每個人都會略有不同。但是,如果上面的兩個表是您的起點,那麼我將執行以下操作:
NamesDefaultToHere(1);
// Data tables
data = DataTable("Test WORKFLOW.jmp");
stats = DataTable("Test WORKFLOW RESULT TABLE.jmp");
// Template expression for Graph Builder with text annotation
gbExpr =
Expr(
data << Graph Builder(
Show Control Panel( 0 ),
Variables( X( :X ), Y( yTBD ), Overlay( :Overlay ) ),
Elements(Line(X, Y, Legend( 12 ), Error Interval( "None" ))),
SendToReport(
Dispatch(
{},
"Graph Builder",
FrameBox,
{Add Graphics Script( 2, Description( "Annotation" ), Text( {8, 0}, "interaction P Val: "||Char(Round(pValTBD, 3))))}
)
)
)
);
// Loop over 'Y' variables
lub = LineUpBox(NCol(1));
for(c=3, c<=NCol(data), c++,
yCol = Column(data, c);
pVal = Column(stats, 2)[c-2];
lub << append(Eval(Substitute(NameExpr(gbExpr), Expr(yTBD), yCol, Expr(pValTBD), pVal)));
);
// Reports in a Journal
nw = NewWindow("Report", <<JOURNAL></JOURNAL>
您應該能夠制定出適合您情況的輪廓。您也可以嘗試包含一些邏輯,以將註釋放置在“更好”的位置。如果不確定其工作原理,請參閱“幫助>腳本指南”和JSL書。