如何编写一个脚本以便能够根据原始数据绘制任何参数?大家好,
最近我在认真思考如何使用JMP进行自动化。 是否有任何脚本可以做到这一点:-
(1) 我将原始数据保存在 JMP 表中。
(2) 我有一个脚本,可以通过从列(原始数据中)获取任何 Y 变量来自动绘制图形(例如,var 图表),并通过固定 X 参数(在脚本中定义)进行绘制。 这将节省一些时间来命名脚本中的所有 Y 变量,特别是当我有大约 50 个参数要添加到脚本中时。
谢谢你,
安
回复:如何编写一个脚本以便能够根据原始数据绘制任何参数?谢谢你,吉姆
回复:如何编写一个脚本以便能够根据原始数据绘制任何参数?默认情况下,SavePresentation() 函数将写入到之前创建的任何 pptx 之上,除非您指定“A
待定”选项。请参阅脚本索引中的文档。
回复:如何编写一个脚本以便能够根据原始数据绘制任何参数?非常感谢你,吉姆。
我一整天都在摆弄各种代码和脚本,但似乎我只能将最后一个图输出到 pptx。 其余的图没有保存到ppt中。 我完全不知道出了什么问题。
/* Open a sample data table */
dt = Open( "C:\Users\Ann Ann/12.jmp" );
// Find the Y Columns
numericColNamesList = dt << get column names( string, numeric );
For( i = N Items( numericColNamesList ), i >= 1, i--,
If(
Not(
Is Missing( Num( Word( 1, numericColNamesList[i], ":" ) ) ) == 0 &
Word( 2, numericColNamesList[i], ":" ) != ""
),
numericColNamesList = Remove( numericColNamesList, i, 1 )
)
);
// Run the Variance Charts
// With dynamic Y columns and fixed X columns
obj = Variability Chart( Y( Eval( numericColNamesList ) ), X( :LOT, :WAFER ) );
robj << Save Presentation( "C:\Users\Ann Ann\1.pptx" );
Open( "C:\Users\Ann Ann\1.pptx" );
/* Close table and all invisible reports */
Close( dt, No Save );
回复:如何编写一个脚本以便能够根据原始数据绘制任何参数?查看脚本索引中的 SavePresentation() 函数。
回复:如何编写一个脚本以便能够根据原始数据绘制任何参数?非常感谢你,吉姆。 似乎我总是犯同样的老错误。
可以寻求您的建议,有什么方法可以自动化并将这些保存的图形输出到Ppt或Word中吗? 我估计地块数量很容易就会达到40-50个。回复:如何编写一个脚本以便能够根据原始数据绘制任何参数?平台的输出保存在平台的报告结构中。因此,您需要引用平台的报告才能访问其输出。
Report( obj ) << Save Picture("C:\Users\Ann Ann" || colList[i] ||".jpg", JPEG );回复:如何编写一个脚本以便能够根据原始数据绘制任何参数?抱歉,我没有正确解释自己,吉姆。 对此我深表歉意。
下面是我尝试修改/最初处理的代码示例。
我正在研究使用输入数据自动绘制变异性图表。 然后输出成ppt之类的。
但不知何故,剧本似乎没有什么效果。
/* Open a sample data table */
dt = Open( "12.jmp" );
/* Obtain a list of numeric/continuous column names as strings */
colList = dt << Get Column Names( Continuous, String );
/* Loop through the list to generate the desired graph
and save the report as a JPEG file */
For( i = 2, i <= Nitems( colList ), i++,
obj = dt << Variability Chart(<BR /> Y( ::Column( dt, colList[i] ) ),<BR /> X( :WAFER ),<BR /> Max Iter( 100 ),<BR /> Conv Limit( 0.00000001 ),<BR /> Number Integration Abscissas( 128 ),<BR /> Number Function Evals( 65536 ),<BR /> Analysis Type( "Choose best analysis (EMS REML Bayesian)" ),<BR /> Connect Cell Means( 1 ),<BR /> Std Dev Chart( 1 ),<BR /> Automatic Recalc( 1 )<BR />);<BR />
);
obj << Save Picture("C:\Users\Ann Ann" || colList[i] ||".jpg", JPEG );
/* Close table and all invisible reports */
Close( dt, No Save );回复:如何编写一个脚本以便能够根据原始数据绘制任何参数?当你说时,我不确定你的期望是什么您希望将它们导出回 Excel 吗?
JMP 可以将图形输出保存到 Word 或 PowerPoint,但不能保存到 Excel。但是,JMP 可以将 JMP 数据表保存到 Excel,但它只会保存数据表,而不会保存任何图形输出。
并且,您可以手动将图形从 JMP 剪切并粘贴到 Excel。
您能提供更多关于您的想法的细节吗?
回复:如何编写一个脚本以便能够根据原始数据绘制任何参数?非常感谢你,吉姆。 这确实对我来说非常有启发。
如果我想将所有这些图表导出到 Excel,我也需要加载到计数器中吗?回复:如何编写一个脚本以便能够根据原始数据绘制任何参数?这是一个应该帮助您入门的简单示例。
Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA\semiconductor capability.jmp" );
// Modify the sample data table to resemble Ann's data table
// Reduce the number of columns for the demonstration
dt << delete columns( Index( 15, N Cols( dt ) ) );
// Add a Serial Number to the parameters
For( i = 5, i <= N Cols( dt ), i++,
Column( dt, i ) << set name(
Substr( "000", 1, 3 - Length( Char( i - 4 ) ) ) || Char( i - 4 ) || ":" ||
Char( Column( dt, i ) << get name )
)
);
// Wait 5 seconds to allow for viewing of the new table before running the
// actual analysis script
Wait( 5 );
/**************************************************************************/
// Actual Analysis Script Example
// Point to the current data table
dt = Current Data Table();
// Find the Y Columns
numericColNamesList = dt << get column names( string, numeric );
// Loop accros the list from back to front and delete all columns
// not meeting the right structure
// nnnnn:cccccc
For( i = N Items( numericColNamesList ), i >= 1, i--,
If(
Not(
Is Missing( Num( Word( 1, numericColNamesList[i], ":" ) ) ) == 0 &
Word( 2, numericColNamesList[i], ":" ) != ""
),
numericColNamesList = Remove( numericColNamesList, i, 1 )
)
);
// Run the Variance Charts
// With dynamic Y columns and fixed X columns
Variability Chart( Y( Eval( numericColNamesList ) ), X( :lot_id, :SITE ) );
回复:如何编写一个脚本以便能够根据原始数据绘制任何参数?嗨吉姆,
Y 变量具有以下特征:
(1) 它们是数字列
(2) 参数名称始终以序列号开头,然后是字母。 例如:
001: 电压_dif <> 引脚输出
002:resistance_div <> PinIn
谢谢你,
安安
回复:如何编写一个脚本以便能够根据原始数据绘制任何参数?安,
一旦确定了 X 和 Y 列,设置任务就变得相当容易。 您指定将在脚本中定义 X 列,以便处理其中一列。但我对 Y 列有点困惑。您能否提供更多有关如何识别数据表中 Y 列的详细信息?
有连续的数字列吗?
您的脚本中是否有任何列未定义为 X 列?
以特定字母系列等开头的任何列。