当FrameBox插入另一个显示框时,它不保留参考线我知道参考线是“轴盒”的属性,但是有什么解决方法? 用例是“排列”框,将多个图中的元素组合为一个。 我无法在此处的讨论板上找到答案。
dt = Data Table("Big Class");
gbBar = Graph Builder(
Size( 521, 452 ),
Show Control Panel( 0 ),
Variables( X( :age ) ),
Elements( Bar( X, Legend( 3 ) ) ),
SendToReport(
Dispatch(
{},
"age",
ScaleBox,
{Add Ref Line( 1.5, "Solid", "Medium Dark Red", "", 1 )}
)
)
);
nw = New Window("for testing",
OutlineBox("stuff",
db1 = H List Box();
)
);
db1 << Append(report(gbBar)[FrameBox(1)]);jmpversion()
/*:
"14.3.0"
图形脚本编写回复:当FrameBox插入另一个显示框时,它不会保留参考线附加PictureBox()而不是FrameBox()
db1 << Append(report(gbBar)[PictureBox(1)]);

回复:当FrameBox插入另一个显示框时,它不会保留参考线感谢您及时的回复。 由于图片框包含轴和图例,因此无法使用。 我正在使用一个阵容框,以便可以将其他元素与x轴对齐。 简化示例:
dt = Data Table( "Big Class" );
gbBar = Graph Builder(
Size( 521, 452 ),
Show Control Panel( 0 ),
Variables( X( :age ) ),
Elements( Bar( X, Legend( 3 ) ) ),
SendToReport( Dispatch( {}, "age", ScaleBox, {Add Ref Line( 1.5, "Solid", "Medium Dark Red", "", 1 )} ) )
);
nw = New Window( "for testing",
Outline Box( "complicated plot",
Spacer Box( Size( 2, 10 ) ),
lu1 = Lineup Box( N Col( 3 ), Spacing( 0 ) )
)
);
lu1 << Append( Report( gbBar )[AxisBox( 2 )] );
lu1 << Append( Report( gbBar )[FrameBox( 1 )] );
lu1 << Append( Report( gbBar )[LegendBox( 1 )] );
//end of row
lu1 << Append( Spacer Box() );
lu1 << Append( Report( gbBar )[AxisBox( 1 )] );
lu1 << Append( Spacer Box() );
//end of row
lu1 << Append( Spacer Box() );
lu1 << Append( insrt_icons = H List Box() );
lu1 << Append( Spacer Box() );
numXAxisWidth = (gbBar << report)[AxisBox( 1 )] << get width;
numAges = N Items( Associative Array( Column( dt, "age" ) ) << get keys );
numOneIncr = (numXAxisWidth) / (numAges);
For( _i = 1, _i <= numAges, _i++,
insrt_icons << Append( Spacer Box( Size( numOneIncr, numOneIncr ), Color( _i ) ) )
);
我很乐意学习替代方法。 最初,我尝试使用与元素的宽度匹配的间隔框(使用<<获取宽度),但是失败了,因为有一些余量我无法解释。
