JSL 函数语法信息(例如:“Legend Model( )”)我确实刚刚开始学习 JMP 和 JSL。
我很难找到函数、命令等的语法信息。
我在“JSL Syntax Reference”文档或在线上都找不到大多数内容。 您对完整的清单有什么建议吗?全部JSL函数和命令?
例如,现在我只是想绘制一个指定图例名称和颜色的图表。 我希望“Legend 1”出现在倒数第二个位置。
网上偷了一些不同的脚本,我整理如下:
Graph Builder(
Size( 779, 677 ),
Show Control Panel( 0 ),
Variables( X( :X ), Y( :Y ), Wrap( :Items ), Color( :Name( "Legends" ) ) ),
Elements( Points( X, Y, Legend( 8 ) ) ),
SendToReport(
Dispatch(
{},
"400",
ScaleBox,
{Legend Model(
8,
Level Name( 0, "Legend 7", Item ID( "Legend 7", 1 ) ),
Level Name( 1, "Legend 2", Item ID( "Legend 2", 1 ) ),
Level Name( 2, "Legend 3", Item ID( "Legend 3", 1 ) ),
Level Name( 3, "Legend 4", Item ID( "Legend 4", 1 ) ),
Level Name( 4, "Legend 5", Item ID( "Legend 5", 1 ) ),
Level Name( 5, "Legend 6", Item ID( "Legend 6", 1 ) ),
Level Name( 6, "Legend 1", Item ID( "Legend 1", 1 ) ),
Level Name( 7, "Legend 8", Item ID( "Legend 8", 1 ) ),
Properties( 0, {Line Color( 36 )} ),
Properties( 1, {Line Color( -15343117 )} ),
Properties( 2, {Line Color( -15343117 )} ),
Properties( 3, {Line Color( -15343117 )} ),
Properties( 4, {Line Color( -15343117 )} ),
Properties( 5, {Line Color( -15343117 )} ),
Properties( 6, {Line Color( 40 )} ),
Properties( 7, {Line Color( 24 )} )
)}
)
)
);这不起作用... 它称为“传奇1”、“传奇7”,仅此而已。
预先感谢您的任何帮助!
大规模定制回复:JSL 函数语法信息(例如:“Legend Model( )”)非常感谢!
回复:JSL 函数语法信息(例如:“Legend Model( )”)你犯了一个重大错误。您正在编写 JSL,而不是让 JMP 为您编写 JSL。如果您按照您想要的方式以交互方式创建图形,那么您可以请求保存 JSL,这将按照您指定的方式重新创建图形。
也就是说,如果你有图表

其中包含除图例规范之外的所有内容,您可以转到红色三角形并选择图例设置

然后在弹出的对话框中可以更改图例1的位置。

然后转到红色小三角并选择保存脚本,它会保存脚本以及重现脚本所需的命令
Graph Builder(
Size( 779, 677 ),
Show Control Panel( 0 ),
Variables( X( :X ), Y( :Y ), Wrap( :Items ), Color( :Legends ) ),
Elements( Points( X, Y, Legend( 8 ) ) ),
SendToReport(
Dispatch(
{},
"400",
ScaleBox,
{Legend Model(
8,
Properties( 0, {Line Color( 36 )}, Item ID( "Legend 1", 1 ) ),
Properties( 1, {Line Color( -15343117 )}, Item ID( "Legend 2", 1 ) ),
Properties( 2, {Line Color( -15343117 )}, Item ID( "Legend 3", 1 ) ),
Properties( 3, {Line Color( -15343117 )}, Item ID( "Legend 4", 1 ) ),
Properties( 4, {Line Color( -15343117 )}, Item ID( "Legend 5", 1 ) ),
Properties( 5, {Line Color( -15343117 )}, Item ID( "Legend 6", 1 ) ),
Properties( 6, {Line Color( 40 )}, Item ID( "Legend 7", 1 ) ),
Properties( 7, {Line Color( 24 )}, Item ID( "Legend 8", 1 ) )
)}
),
Dispatch(
{},
"400",
LegendBox,
{Legend Position( {8, [6, 0, 1, 2, 3, 4, 5, 7]} )}
)
)
);

我发现脚本索引是所有函数和平台语法的最佳参考。它包含可以发送到平台和功能的所有消息以及实例。