Hi Team,
I would like to modify the script below to add Ns to the GraphBuilder via substitution of the placeholders "_text0_" to "_text5_".
I know how to implement a single substitution for the "_Yname_" placeholder but I'm running into a mental block to figure out multiple substitution.
Also, I don't know how to call a column statistic to generate dynamically the Ns for each overlay on the plots (see picture below script)
Names Default to Here (1);
dt = Current Data Table ();
Clist = dt << Get Column Names (String);
For (i = 932, i<= 935, i++,
gb = Expr ( Graph Builder(
Size( 789, 440 ),
Variables(
X( :Visit ),
Y( column (i) ),
Group X( :LEAD TAG ),
Overlay( :SHORT TAG )
),
Elements( Line( X, Y, Legend( 7 ), Error Bars( "Standard Error" ) ) ),
SendToReport(
Dispatch(
{},
_Yname_,
ScaleBox,
{Format( "Best", 12 ), Min( -1.8 ), Max( 1.0 ),
Inc( 0.2 ), Minor Ticks( 1 ),
Add Ref Line( 0, "Dotted", "Black", "", 2 )}
),
Dispatch(
{},
"Graph Builder",
FrameBox,
{Add Graphics Script(
2,
Description( "Script" ),
Text( Center Justified, {0.5, -1.6}, "_text0_" )
), Add Graphics Script(
3,
Description( "Script" ),
Text( Center Justified, {0.5, -1.75}, "_text1_" )
), Grid Line Order( 5 ), Reference Line Order( 6 )}
),
Dispatch(
{},
"Graph Builder",
FrameBox( 2 ),
{Left( 1 ), Right( 0 ), Top( 0 ), Bottom( 1 ),
Add Graphics Script(
2,
Description( "Script" ),
Text( Center Justified, {0.5, -1.75}, "_text3_" )
), Add Graphics Script(
3,
Description( "Script" ),
Text( Center Justified, {0.5, -1.6}, "_text2_" )
), Grid Line Order( 5 ), Reference Line Order( 6 )}
),
Dispatch(
{},
"Graph Builder",
FrameBox( 3 ),
{Left( 1 ), Right( 1 ), Top( 0 ), Bottom( 1 ),
Add Graphics Script(
2,
Description( "Script" ),
Text( Center Justified, {0.5, -1.6}, "_text4_" )
), Add Graphics Script(
3,
Description( "Script" ),
Text( Center Justified, {0.5, -1.75}, "_text5_" )
), Grid Line Order( 5 ), Reference Line Order( 6 )}
)
)
)
);
gbe = Eval (substitute(Name Expr (gb), Expr (_Yname_), Clist [i]));
gbe << journal;
gbe << close window;
);