Hi Jarmo,
I've added the nested for loops which achieved the desired result. Without the second loop the added reference would only appear in the first of the three plots. Please note that I assigned numOfPlots
a constant value of 3. I was looking for a way to interrogate the report(AxisBox... for dimensions, but I did not find the right object to return the correct count.
In all there are three nested for loops to produce distributions and to annotate them with refence lines.
...
For Each( {report, idx}, distRPTs, //grab each report in the
...
For Each( {bin, index}, theBins, //process bin for each report
...
For( iPlot = 1, iPlot <= numOfPlots, iPlot +=1, << add refer. in each of the subplots.
...
...
For Each( {bin, index}, theBins,
binList = {};
//TBD change bin width to avoid offset when bin width is an odd number
Insert Into( binList, bin - theIncr / 2 );
Insert Into( binList, bin + theIncr / 2 );
For( iPlot = 1, iPlot <= numOfPlots, iPlot +=1,
Eval( Eval Expr(report[AxisBox( iPlot )] << Add Ref Line( Expr( binList ), "Solid", Expr( Index + 2 ), "", 1, 0.25 ) ) );
);
);