如何編寫一個腳本以便能夠根據原始資料繪製任何參數?大家好,
最近我在認真思考如何使用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 列?
以特定字母系列等開頭的任何列。