您好 JMP 社区,
我有一个脚本,将两组列填充到两个不同的列表中。
然后我遍历两个集合中的列名列表,当它们匹配时(部分通过正则表达式)我做一个 Y 乘 X 绘图。 - 这可以。
正在填充单个双变量图,但未附加到日志中。 
- 我可以手动完成,但地块非常多(100 到 1000 的顺序)
- 试图模仿有两个期刊的其他示例的部分内容(temp = xx,以及主要的“样本期刊”)
JSL - 将表添加到日志
- 尝试查看我的旧脚本,这有效(推送到期刊)。 然而,我不清楚我错过了什么。在这种情况下,这部分代码如下所示,其中 newplot 与当前示例相似
Current Journal( "Y_vs_X" );
Report( newplot ) << Journal( "Y_vs_X" );
我在下面/附加的脚本中包含了很大一部分。 虽然这里没有包含参数或数据表。 我认为专业人士会很快发现错误,因此我可以避免重复此操作并更好地理解。
//Match parameters that are common between set 1 and set 2 to do bivariate plot and push to journal
For( v = 1, v <= Count_set1, v++,
Titlex = Char( set1_list[v] );
If( Pat Match( Titlex, Regex( Titlex, "([\w.+])(.+)(\:)(.+)(\:)(.+)", "\1\2\3\4" ) ),
matchone = Regex( Titlex, "([\w.+])(.+)(\:)(.+)(\:)(.+)", "\1\2\3\4" ),
);
For( w = 1, w <= Count_set2, w++,
Titley = Char( set2_list[w] );
If( Pat Match( Titley, Regex( Titley, "([\w.+])(.+)(\:)(.+)(\:)(.+)", "\1\2\3\4" ) ),
matchtwo = Regex( Titley, "([\w.+])(.+)(\:)(.+)(\:)(.+)", "\1\2\3\4" ),
);
If(
matchone == matchtwo,
newplot = mydataTable << Bivariate(
X( :As name( Titlex ) ),
Y( :As name( Titley ) ),
SendToReport(
Dispatch(
{},
"Bivar Plot",
FrameBox,
{Add Graphics Script(
2,
Description( "" ),
Pen Color( "blue" );
Y Function( x, x );
), Grid Line Order( 1 ), Reference Line Order( 3 ), DispatchSeg(
TopSeg( 1 ),
{Set Script(
Pen Color( "blue" );
Y Function( x, x );
)}
)}
)
),
rep_plot = newplot << report;
invisible,
),
Wait( 0.01 ),
tmpjrnl = New Window( "temp_journal", <<journal );
rep_plot << journal;
hlb << append (tmpjrnl);
tmpjrnl << close window;
,
);,
);
);
Print( "This is the end, the script has finished running..." );
实际上,我发现我的错误是在 Wait 语句之后使用了“,”。
用“;”替换它并在下面解决了问题
Wait( 0.01 );
newjrnl << append(Report( current_plot_new ));