在使用“页面”布局功能并保持 Y 轴独立时,需要脚本帮助在 Graph Builder 上广播 Y 轴线嘿大家,
虽然 Graph Builder 中堆叠面板的新功能令人惊叹,但实现这一惊人功能的关键是保持 Y 轴彼此独立。但是,当您有很多面板(级别)并想要添加 Y 轴网格线时,您必须逐个添加,这太糟糕了。有没有关于脚本的想法,可以让您索引每个面板并独立添加网格线?
在这里您可以看到我使用了老式的方法(在大类数据集中)复制轴设置并广播它们的粘贴,虽然它确实添加了网格线,但它将所有 Y 轴范围设置为与复制的面板设置相同。

感谢您的任何想法!
史蒂夫
自动化和脚本数据探索与可视化回复:在使用“页面”布局功能并保持 Y 轴独立时,需要有关在 Graph Builder 上广播 Y 轴线的脚本的帮助使用 XPath 获取您感兴趣的轴框(X 轴、Y 轴或两者)的引用,然后对该轴框列表执行任何您想做的事情。此示例在所有框架框上启用 Y 轴的主网格
Names Default To Here(1);
dt = open("$SAMPLE_DATA/Big Class.jmp");
gb = dt << Graph Builder(
Size(893, 542),
Show Control Panel(0),
Variables(X(:weight), Y(:height), Page(:age, Levels per Row(3)), Overlay(:sex)),
Elements(Points(X, Y, Legend(9)))
);
abs = Report(gb) << XPath("//AxisBox");
yaxis = abs[2::NItems(abs)::2];
yaxis << Show Major Grid(1);

回复:在使用“页面”布局功能并保持 Y 轴独立时,需要有关在 Graph Builder 上广播 Y 轴线的脚本的帮助速度真快,Jarmo!我更喜欢你的解决方案,但这里有另一种使用 Eval(Parse()) 的方法。
Names Default To Here( 1 );
//Manually add your reference line to the top left panel of the graph builder.
//Then run this script with the graph builder report in focus.
axisList = Current Report() << XPath( "//AxisBox" );
//Grab axis specifications from vertical axis of first panel
//(vertical axes are even-numbered items; horizontal axes are odd)
axspecList = axisList[2] << Get Script();
//find the Reference Line among the other specifications
For( i = 1, i <= N Items( axspecList ), i++,
If( Left( Char( axspecList[i] ), 12 ) == "Add Ref Line",
rlindex = i;
Break();
)
);
//Reference Line specification as string
rlstr = Char( axspecList[rlindex] );
//Apply Reference Line specification to the remaining panels
For( j = 4, j <= N Items( axisList ), j = j + 2,
estr = "axisList[" || Char( j ) || "] <<" || rlstr;
Eval( Parse( estr ) );
);