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は次のようになります。
| グループ | test1 | test2 | test3 | 1 | 1 |
| BL | 1 | 1 | 1 | 1 | 1 |
| BL | 2 | 2 | 2 | 2 | 65 |
| BL | 23 | 3 | 6 | 1 | 1 |
| POR | 2 | 2 | 2 | 2 | 2 |
| 値1 | 1 | 1 | 1 | 3 | 4 |
| POR | 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番目の線は2-7など)。
ありがとう!
スクリプティングRe: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;