大家好,
我不是来提问的,而是想分享一下我在流程筛选平台中找到的一个解决方案,它可以将一个图表的坐标轴设置添加到其他多个图表中。例如,我想把我在左上角这个图表上做的自定义设置添加到所有其他图表中:

如果您右键单击图表轴(例如 X 轴)并选择“复制轴设置”,然后运行下面的脚本,它会将这些设置转换到所有其他图表——只需让脚本知道您要更改的是 X 轴还是 Y 轴即可。

如有任何问题,请随时联系我!
谢谢,
本
NamesDefaultToHere(1);
//blank out the variables
axis_type={};
axis={};
cur_rep = Current Report();
// Get the current report
//load in the 'run' expression
run_expr=expr(
// Get all AxisBox elements
axis = cur_rep << XPath("//AxisBox"); //use Xpath to grab the reference to all AxisBoxes in the report.
// Separate into y_axis (odd-numbered) and x_axis (even-numbered) - PScreening makes axisboxes into Y (AxisBox(1), AxisBox(3)) or X (AxisBox(2),AxisBox(4)) that can be distinguished by their number
y_axis = {};
x_axis = {};
//Sort through the 'axis' list and place them in either a Y or X axis list
For(i = 1, i <= N Items(axis), i++,
If(Mod(i, 2) == 1, // Odd index for Y-axis
Insert Into(y_axis, axis[i]),
Insert Into(x_axis, axis[i]) // Even index for X-axis
)
);
// Apply settings based on user choice
If(axis_type == 1,
For(i = 1, i <= N Items(y_axis), i++,
y_axis[i] << Paste Axis Settings
),
For(i = 1, i <= N Items(x_axis), i++,
x_axis[i] << Paste Axis Settings
)
););
//Startup with a window to choose the axis
nw=New Window("Choose axis type to update",
OutlineBox("Update Axes in Process Screening",
TextBox("Choose which axis type to update that you have copied axis settings from"),
cb=combobox({"Y","X"}),
ButtonBox("OK",
axis_type=cb<
<GET></GET>
<BR />
您还可以通过广播并使用“粘贴坐标轴”设置来实现此操作。这会更改坐标轴的最小值/最大值,有时可能会出现问题,但您可以先将脚本粘贴到新的脚本窗口中,删除这些设置,再次复制脚本,然后进行广播和粘贴。