JSL 在图表上创建线条你好,
所以我试图创建像这个脚本中那样的红线
Names Default To Here( 1 );
dt = Current Data Table();
listX = {"1"};
listY = {"test1", "test2", "test3"};
lowLine = 3;
highLine = 5;
bivExpr = Expr(
Bivariate(
Y( Eval List( listY ) ),
X( Eval List( listx ) ),
Fit Spline( 1, Standardized, {Line Color( "Blue" )} ),
SendToReport(
Dispatch(
{},
"Bivar Plot",
FrameBox,
{Add Graphics Script(
2,
Description( "Script" ),
Pen Color( "Red" );
Line Style( "dashed" );
X Function( lowLine, x );
X Function( highLine, x );
), Grid Line Order( 1 ), Reference Line Order( 3 )}
)
)
)
);
bivExpr;我的表DT是这样的:
| 团体 | 测试1 | 测试2 | 测试3 | 1 | 1 |
| BL | 1 | 1 | 1 | 1 | 1 |
| BL | 2 | 2 | 2 | 2 | 65 |
| BL | 23 | 3 | 6 | 1 | 1 |
| 经过 | 2 | 2 | 2 | 2 | 2 |
| 值1 | 1 | 1 | 1 | 3 | 4 |
| 经过 | 5 | 7 | 2 | 2 | 2 |
| 值1 | 7 | 5 | 1 | 7 | 3 |
| 值2 | 2 | 2 | 2 | 2 | 2 |
| 值0 | 8 | 1 | 1 | 1 | 6 |
结果:

我的问题是如何为每个图表创建不同的线条(第一个图表为 3-5,第二个图表为 2-7,依此类推)
谢谢!
大规模定制回复:JSL 在图形上创建线条使用参考线是我处理这个的方式

Names Default To Here( 1 );
dt = Current Data Table();
listX = {"1"};
listY = {"test1", "test2", "test3"};
lowList = {3, 2, 1};
highList = {5, 7, 9};
lowLine = 3;
highLine = 5;
bivExpr = Expr(
biv = Bivariate(
Y( Eval List( listY ) ),
X( Eval List( listx ) ),
Fit Spline( 1, Standardized, {Line Color( "Blue" )} )
);
For( i = 1, i <= N Items( listY ), i++,
Report( biv[i] )[AxisBox( 2 )] << add Ref Line( lowList[i], "Dashed", "Red" );
Report( biv[i] )[AxisBox( 2 )] << add Ref Line( highList[i], "Dashed", "Red" );
);
);
bivExpr;