早上好,
在使用列选择器时,如何向分布平台的直方图添加参考线(均值线)?我希望为 10 个变量中的每一个都添加这条线,显然不想手动添加。
先感谢您。
让-吕克
以下是一些 JSL 选项的示例(实现这些选项的方法有很多种):
图形脚本选项示例:
Names Default To Here(1);
dt = open("$SAMPLE_DATA/Big Class.jmp");
dist = dt << Distribution(
Continuous Distribution(
Column(:height),
Always use column properties(1),
Process Capability(0)
),
Column Switcher(:height, {:height, :weight})
);
Report(dist)[FrameBox(1)] << Add Graphics Script(Function({this},
m = ((this << Top Parent)[OutlineBox("Summary Statistics"), Number Col Box(1)] << get)[1];
Pen Color("Purple");
Pen Size(5);
H Line(m);
));
列切换处理程序示例:
Names Default To Here(1);
dt = open("$SAMPLE_DATA/Big Class.jmp");
dist = dt << Distribution(
Continuous Distribution(
Column(:height),
Always use column properties(1),
Process Capability(0)
)
);
cw = dist << Column Switcher(:height, {:height, :weight});
post = Function({previousColumn, currentColumn, switcher},
prevm = Col Mean(previousColumn);
m = Col Mean(currentColumn);
axisbox = Report(dist)[axis box(1)];
Try(axisbox << Remove Ref Line(prevm));
axisbox << Add Ref Line(m, "Dashed", blue, "Mean", 2);
wait(0);
);
handler = cw << Make Column Switch Handler(Empty(), post);