有没有办法指定 FrameBox 中 TextSeg 的 x/y 位置?Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
Graph Builder(
Show Control Panel( 0 ),
Variables( X( :height ), Y( :weight ) ),
Elements(
Points( X, Y, Legend( 1 ) ),
Line Of Fit(
X,
Y,
Legend( 4 ),
Degree( "Cubic" ),
Confidence of Prediction( 1 ),
Root Mean Square Error( 1 ),
Equation( 1 )
)
),
SendToReport(
Dispatch(
{},
"Graph Builder",
FrameBox,
{DispatchSeg(
TextSeg( 1 ),
Set Text(
"weight = -3850 + 197.7*height - 3.343*height² + 0.01906*height³
RMSE: 15.77 Tallest: Lawrence"
)
)}
)
)
);
自动化和脚本编写回复:有没有办法指定 FrameBox 中 TextSeg 的 x/y 位置?好吧,确实知道 Text()。 TextSeg 对我来说相对较新,我想知道它的局限性。 谢谢贾斯汀!
回复:有没有办法指定 FrameBox 中 TextSeg 的 x/y 位置?如果要控制文本的 X 和 Y 位置,则需要将图形脚本添加到 FrameBox 而不是 TextSeg,因为 TextSeg 始终出现在左上角。
这是一个例子:
Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA\Big Class.jmp" );
gb = dt << Graph Builder(
Show Control Panel( 0 ),
Variables( X( :height ), Y( :weight ) ),
Elements(
Points( X, Y, Legend( 1 ) ),
Line Of Fit(
X,
Y,
Legend( 4 ),
Degree( "Cubic" ),
Confidence of Prediction( 1 ),
Root Mean Square Error( 1 ),
Equation( 1 )
)
)
);
Report( gb )[FrameBox( 1 )] << Add Graphics Script(
Text( Center Justified, {60, 40}, "Tallest: Lawrence" )
);