在分佈圖中分組的多列腳本我正在嘗試編寫一種方法來繪製在分佈中組合在一起的多個參數列(如圖所示)。 我的問題是代碼需要為每個參數列單獨的“連續分佈”行。 根據我在做什麼,我的數據拉取具有不同的列名和要繪製的列數。 我無法弄清楚如何獲取該列名稱列表並將其繪製在一個組中,如下所示,而不是循環遍歷並為每個參數創建單獨的圖。
Distribution(
Continuous Distribution( Column( :Parameter1 ) ),
Continuous Distribution( Column( :Parameter2 ) ),
Continuous Distribution( Column( :Parameter3 ) )
);

回复:編寫分佈圖中分組的多列腳本這是我將如何處理這個問題
names default to here(1);
dt=open("$SAMPLE_DATA/semiconductor capability.jmp");
colList = dt << get column names(continuous,string);
// For this illustration I want to use just the NPNn columns
for(i=nitems(colList), i>=1,i--,
If(substr(colList[i],1,3)!="NPN", remove from(colList,i,1))
);
// build the JSL string
theExpr =
"Dis = Distribution(
Continuous Distribution( Column( :" || colList[1] || " ),
Process Capability( Use Column Property Specs ) )";
For( i = 2, i <= N Items( colList ), i++,
theExpr = theExpr || "," || "Continuous Distribution( Column( :" || colList[i] ||
" ), Process Capability( Use Column Property Specs ) )"
);
theExpr=theExpr||");";
// run the built JSL string
eval(parse(theexpr));
// Standardize the settings
disr = Dis << report;
disr[colList[1]]["Quantiles"]<<CLOSE all="" like="" this=""></CLOSE>回复:編寫分佈圖中分組的多列腳本注意,我認為我認為一切都從應用程序開始的假設讓我很痛苦。
希望還有一個問題,如果我想設置的屬性全部報告中的分佈,就像我在這裡對這個單一變量所做的那樣, “T05066DD ET_DELTA 比率”是否有一個簡單的命令來執行此操作,或者我是否需要構建一個 for 循環並為列表中的每個變量運行“sendtoreport”?
ET_DELTA_List = {};<BR />dist = dt << Distribution(Columns(evalList(ET_DELTA_List)));
dist << arrange in rows(5);
dist << Quantiles(0);
dist << Summary Statistics(0);
report(dist)[OutlineBox(2)] << Open all like this(1);
//show properties(dist)
dist << SendToReport(
Dispatch(
{"T05066DD ET_DELTA Ratio"},//this is one of many distributions. i would like to set the following properties to all the distributions in the report
"1",
ScaleBox,
{Min( -5 ), Max( 5 ), Inc( 5000 ), Minor Ticks( 1 ),
Add Ref Line( 2, "Solid", "Black", "", 1 ),
Add Ref Line( -2, "Solid", "Black", "", 1 )}
)
)</CODE></P><P> </P></LINGO-BODY><LINGO-SUB id="lingo-sub-277293" slang="en-US" mode="NONE">回复:編寫分佈圖中分組的多列腳本</LINGO-SUB><LINGO-BODY id="lingo-body-277293" slang="en-US" mode="NONE"><P>我只是避免將它放入應用程序的開銷。</P></LINGO-BODY><LINGO-SUB id="lingo-sub-277279" slang="en-US" mode="NONE">回复:編寫分佈圖中分組的多列腳本</LINGO-SUB><LINGO-BODY id="lingo-body-277279" slang="en-US" mode="NONE"><P>好,謝謝。</P><P>你這樣做的策略是什麼? 您會避免將應用程序構建器與分配等一起使用,而只使用腳本來定位所有內容嗎?</P><P>再次感謝</P><P>韋恩。</P></LINGO-BODY><LINGO-SUB id="lingo-sub-277090" slang="en-US" mode="NONE">回复:編寫分佈圖中分組的多列腳本</LINGO-SUB><LINGO-BODY id="lingo-body-277090" slang="en-US" mode="NONE"><P>最簡潔的答案是不。您至少需要創建一個包含所有 JMP App 代碼的字符串。</P></LINGO-BODY><LINGO-SUB id="lingo-sub-277077" slang="en-US" mode="NONE">回复:編寫分佈圖中分組的多列腳本</LINGO-SUB><LINGO-BODY id="lingo-body-277077" slang="en-US" mode="NONE"><P>如果我想將其放入具有本地數據過濾器的應用程序中,我可以將 Allocate 語句放在 Eval(Parse) 中嗎?</P><P>所以..</P><PRE><CODE class=" language-jsl">theExpr = "dis = Allocate(
Border1 = Border Box();
DataFilterContext1 = Data Filter Context Box();
List1 = H List Box();
DataFilter1 = Dt << Data Filter( Local );
Report1 = Platform(
Dt,
Distribution(
Continuous Distribution( column( column(Dt, colNames[1])))";
For( i = 2, i <= N Items( colNames ), i++,
theExpr = theExpr || ", Continuous Distribution( column( column(Dt, colNames[" || Char( i ) || "])))"
);
theExpr = theExpr || " )
);
)";
show(theexpr);
Eval( Parse( theExpr ) );
回复:編寫分佈圖中分組的多列腳本您需要做的就是修改列名列表以滿足要求。有很多方法可以做到這一點,下面是一個例子
Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA/semiconductor capability.jmp" );
// Get the all of the numeric, continuous column names
colNames = dt << get column names( string, continuous );
// Work backwards through the list of columns eliminating those that
// do not meet the pattern one is interested in
For( i = N Items( colNames ), i >= 1, i--,
If( left( colNames[i], 3 ) != "NPN" , colNames = remove( colNames, i, 1 ) );
);
// Build a character string that represents the commands that need to be run
theExpr = "dis = dt << Distribution(
Continuous Distribution( column( column(dt, colNames[1])))";
// Loop across the remaining columns in the colNames list and generate the continuous distribution
// commands
For( i = 2, i <= N Items( colNames ), i++,
theExpr = theExpr || ", Continuous Distribution( column( column(dt, colNames[" || Char( i ) || "])))"
);
// place the closing ")" to complete the command string
theExpr = theExpr || ");";
// Execute the code generated and placed into the character string variable
Eval( Parse( theExpr ) );
回复:編寫分佈圖中分組的多列腳本@txnelson我已經使用了這個腳本並且它有效。 我想做的是使我的報告自動化,但我的數據表由 300 多列組成,列數每週變化。 我有以 ex 開頭的列名。 "Fail1", "Fail2",,, "Total1","Total2",,, "Yield1", "Yield2",,, "Loss1", "Loss2",,.如何過濾以僅顯示連續分佈,例如“Loss1”、“Loss2”?
回复:編寫分佈圖中分組的多列腳本@羅恩斯旺森,
吉姆@txnelson的腳本為您提供更多控制和解決方案。 這是一個替代選項,因為我經常被問到如何輕鬆編寫未知數量的發行版腳本。該腳本還包括“包裝”分佈的命令,以及如何通過向對象發送消息(能力分析消息)以及向顯示圖標發送消息來向所有分佈發送消息。
Names default to Here(1);
dt = Open("$Sample_Data/Semiconductor Capability.jmp");
cnames = dt << get column names("Continuous", "string");
//Here I will just use 10
cnames = cnames[1::10];
dist = dt << Distribution(Columns(evalList(cnames)));
//if you want to limit the number per row
dist << arrange in rows(3); //change 3 to 5 or whatever you want
dist << Capability Analysis(0); //turn off the distribution
report(dist)[OutlineBox(2)] << Open all like this(1); //reveal all distributions
report(dist)[OutlineBox(2)] << Close all like this(1); //do not reveal

回复:編寫分佈圖中分組的多列腳本正是我需要的...謝謝 tx!!回复:編寫分佈圖中分組的多列腳本這是生成所需代碼的一種方法
Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA/big class.jmp" );
// Get the all of the numeric, continuous column names
colNames = dt << get column names( string, continuous );
// Build a character string that represents the commands that need to be run
theExpr = "dis = dt << Distribution(
Continuous Distribution( column( column(dt, colNames[1])))";
// Loop across the remaining columns in the colNames list and generate the continuous distribution
// commands
For( i = 2, i <= N Items( colNames ), i++,
theExpr = theExpr || ", Continuous Distribution( column( column(dt, colNames[" || Char( i ) || "])))"
);
// place the closing ")" to complete the command string
theExpr = theExpr || ");";
// Execute the code generated and placed into the character string variable
Eval( Parse( theExpr ) );