嗨,JMP社區,
我有一個腳本,可將兩組列填充到兩個不同的列表中。
然後,我遍歷這兩個集合的列名列表,並且當它們匹配時(部分通過正則表達式),我將進行X的Y繪製。- 這可以。
正在填充各個二元圖,但未將其附加到日記帳中。:(
-我可以手動完成,但地塊很多(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 ));