JMP中如何通过指定曲线名称来自定义曲线图?

In JMP, how to custom graph line by specifying the curve name?

在 JMP 中,我们可以使用此代码自定义任何拟合曲线

obj << (Curve[1] << Line Style( DashDot ));

现在我要自定义的线型不是根据曲线编号而是根据曲线名称。

例如,如果我有 5 条曲线(按星期几分组),我希望所有以 "S" 开头的日子(即周末)为 DashDot。

有办法吗?

谢谢。

我找到了解决办法。它包括两个步骤: 1. 将分组列内容存储在列表中。获取列表的大小 2.在绘图脚本中添加一个for循环,如果满足特定条件,则自定义线条样式。

这是第 1 步的代码:

Summarize(A = by(groupcol));
B=groupcol<<get property(value ordering);
If (Isempty(B),
GroupList=A;,
GroupList=B;
);
GroupListN=Nitems(GroupList);

这是第 2 步的代码:

For( c=1, c<=GroupListN, c++,
    If (Left(GroupList[c],1)=="S",
    plotscript=plotscript||"biv << (Curve[" ||Char(c)||"] << Line Style( Dashed ));";
        );
    );
plotscript  = plotscript|| "rbiv = biv<<report;"
plotscript = Eval( Parse( plotscript ) );

plotscript 变量包含绘图脚本。添加第二个代码块。