你好,
我無法根據列參數在圖中新增水平參考線。 程式碼附在下面。 我需要參考線是水平線而不是垂直線:
Names Default to Here( 1 );
quantile_plot = Graph Builder(
Size( 528, 631 ),
Show Control Panel( 0 ),
Variables( X( :Dataset ), Y( :y ), Color( :SAMPLEID ) ),
Elements( Points( X, Y, Legend( 4 ), Jitter( "Random Uniform" ) ) ),
Local Data Filter(
Add Filter(
columns( :Gender, :Ethnicity, :Age, :Congener ),
Where( :Gender == "1" ),
Where( :Ethnicity == "3" ),
Where( :Age == "4" ),
Where( :Congener == "LBC028" ),
Display( :Ethnicity, N Items( 5 ) ),
Display( :Age, N Items( 4 ) ),
Display( :Congener, N Items( 15 ), Find( Set Text( "" ) ) )
)
),
SendToReport(
Dispatch(
{},
"Dataset",
ScaleBox,
{Add Ref Line( -0.5, "Solid", "Red", "", 2 )}
),
Dispatch(
{},
"y",
ScaleBox,
{Scale( "Log" ), Format( "Best", 6 ), Min( 0.261333735635329 ),
Max( 20 ), Inc( 1 ), Minor Ticks( 1 )}
)
)
);
report(quantile_plot)[axisbox(2)] << Add Ref Line( threshold, "solid", black, "", 2 );
report(quantile_plot)[axisbox(2)]<< min(threshold);

該線需要根據“閾值”列出的值保持水平。 我想要這些,以便我可以自動建立資料過濾器並查看該行如何變更。
如果平移或縮放 Y 軸以減少顯示的最小值,參考線是否會出現?由於您的腳本將最小值設定為與參考線相同的值,因此我擔心數字問題可能會導致參考線從視圖中被剪掉。