在分布图中分组的多列脚本我正在尝试编写一种方法来绘制在分布中组合在一起的多个参数列(如图所示)。 我的问题是代码需要为每个参数列单独的“连续分布”行。 根据我在做什么,我的数据拉取具有不同的列名和要绘制的列数。 我无法弄清楚如何获取该列名称列表并将其绘制在一个组中,如下所示,而不是循环遍历并为每个参数创建单独的图。
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 ) );