你好,
我无法根据列参数在图中添加水平参考线。 代码附在下面。 我需要参考线是水平线而不是垂直线:
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 轴以减小显示的最小值,参考线是否会出现?由于您的脚本将最小值设置为与参考线相同的值,因此我担心数字问题可能会导致参考线从视图中被剪掉。