Kombination von For-Schleife und Dispatch()-Befehl in einem VariabilitätsdiagrammHallo an alle,
Ich bin neu bei JMP und der Programmierung im Allgemeinen. Meine aktuelle Herausforderung:
Ich habe eine große Datentabelle mit 800 Spalten. Nun möchte ich Boxplots mit dem Variability Chart erstellen, aber mit einer Liste, in der ich zuerst definiere, welche Spalten aus den 800 ich verwenden möchte. Dann erstelle ich eine For-Schleife wie unten gezeigt.
Was ist die richtige Syntax, um den Concat zum Laufen zu bringen?
Danke
Datalist_log = {Test1, Test2, Test33, Test50}; //first I define the list with the tests I Need. It needs to be like this in the code.
imax = N Items( Datalist );
//Boxplots
For( i = 1, i <= imax, i++,
Variability Chart(
Y( Datalist_log[i] ), //Loop cycling through the list putting the respective column on the Y axis
X( :wafernr ),
Max Iter( 100 ),
Conv Limit( 0.00000001 ),
Number Integration Abscissas( 128 ),
Number Function Evals( 65536 ),
Analysis Type( "Choose best analysis (EMS REML Bayesian)" ),
Std Dev Chart( 1 ),
Show Box Plots( 1 ),
SendToReport(
Dispatch(
{"Variability Chart for Test1"}, <BR />// This is how it looks when it works. <BR />//But I need to replace the hard coded string with an element from<BR />//the list defined above as a part of the Loop, for example:
{"Variability Chart for " ||Datalist_log[i]}, <BR />//This is my most promising attempt. But I have failed to understand how the concat works.
//If i manually change the argument to <BR />//{"Variability Chart for XYSomethingElse"}, the outcome is the same, meaning that the <BR />//formatting commands (lot plot, scientific axis etc.) that follow are all ignored.
"2",
ScaleBox,
{Scale( "Log" ), Format( "Scientific", 12 ), Min( 0.0000000001 ), Max( 0.000001 ), Inc( 1 ), Minor Ticks( 0 ),
Add Ref Line( UpperSpec_log[i], "Dotted", "Black", "USL", 2 )}
),
Dispatch(
{"Variability Chart for Test1"},
"Variability Chart",
FrameBox,
{Frame Size( 600, 240 ), Marker Size( 1 ),
DispatchSeg( Box Plot Seg( 1 ), {Box Type( "Outlier" ), Line Color( "Red" ), Line Width( 2 )} ),
DispatchSeg( Box Plot Seg( 2 ), {Box Type( "Outlier" ), Line Color( "Red" ), Line Width( 2 )} ),
DispatchSeg( Box Plot Seg( 3 ), {Box Type( "Outlier" ), Line Color( "Red" ), Line Width( 2 )} ),
DispatchSeg( Box Plot Seg( 4 ), {Box Type( "Outlier" ), Line Color( "Red" ), Line Width( 2 )} ),
DispatchSeg( Box Plot Seg( 5 ), {Box Type( "Outlier" ), Line Color( "Red" ), Line Width( 2 )} ),
DispatchSeg( Box Plot Seg( 6 ), {Box Type( "Outlier" ), Line Color( "Red" ), Line Width( 2 )} ),
DispatchSeg( Box Plot Seg( 7 ), {Box Type( "Outlier" ), Line Color( "Red" ), Line Width( 2 )} ),
DispatchSeg( Box Plot Seg( 8 ), {Box Type( "Outlier" ), Line Color( "Red" ), Line Width( 2 )} ),
DispatchSeg( Box Plot Seg( 9 ), {Box Type( "Outlier" ), Line Color( "Red" ), Line Width( 2 )} ),
DispatchSeg( Box Plot Seg( 10 ), {Box Type( "Outlier" ), Line Color( "Red" ), Line Width( 2 )} ),
DispatchSeg( Box Plot Seg( 11 ), {Box Type( "Outlier" ), Line Color( "Red" ), Line Width( 2 )} ),
DispatchSeg( Box Plot Seg( 12 ), {Box Type( "Outlier" ), Line Color( "Red" ), Line Width( 2 )} ),
DispatchSeg( Box Plot Seg( 13 ), {Box Type( "Outlier" ), Line Color( "Red" ), Line Width( 2 )} ),
DispatchSeg( Box Plot Seg( 14 ), {Box Type( "Outlier" ), Line Color( "Red" ), Line Width( 2 )} ),
DispatchSeg( Box Plot Seg( 15 ), {Box Type( "Outlier" ), Line Color( "Red" ), Line Width( 2 )} ),
DispatchSeg( Box Plot Seg( 16 ), {Box Type( "Outlier" ), Line Color( "Red" ), Line Width( 2 )} ),
DispatchSeg( Box Plot Seg( 17 ), {Box Type( "Outlier" ), Line Color( "Red" ), Line Width( 2 )} ),
DispatchSeg( Box Plot Seg( 18 ), {Box Type( "Outlier" ), Line Color( "Red" ), Line Width( 2 )} ),
DispatchSeg( Box Plot Seg( 19 ), {Box Type( "Outlier" ), Line Color( "Red" ), Line Width( 2 )} ),
DispatchSeg( Box Plot Seg( 20 ), {Box Type( "Outlier" ), Line Color( "Red" ), Line Width( 2 )} ),
DispatchSeg( Box Plot Seg( 21 ), {Box Type( "Outlier" ), Line Color( "Red" ), Line Width( 2 )} ),
DispatchSeg( Box Plot Seg( 22 ), {Box Type( "Outlier" ), Line Color( "Red" ), Line Width( 2 )} ),
DispatchSeg( Box Plot Seg( 23 ), {Box Type( "Outlier" ), Line Color( "Red" ), Line Width( 2 )} ),
DispatchSeg( Box Plot Seg( 24 ), {Box Type( "Outlier" ), Line Color( "Red" ), Line Width( 2 )} ),
DispatchSeg( Box Plot Seg( 25 ), {Box Type( "Outlier" ), Line Color( "Red" ), Line Width( 2 )} )}
),
Dispatch( {"Variability Chart for Test1"}, "", NomAxisBox, {Set Width( 573 ), Set Height( 21 )} ),
Dispatch( {"Variability Chart for Test1"}, "Varability Std Chart", FrameBox, {Frame Size( 559, 180 )} )
)
//)
);
Betreff: Kombination von For-Schleife und Dispatch()-Befehl in einem VariabilitätsdiagrammIhr Code-Snippet erlaubt mir nicht, das Problem herauszufinden.Mein erster Vorschlag ist, JMP herunterzufahren und dann neu zu starten.In seltenen Fällen wird JMP verwirrt.Durch einen Neustart von JMP wird dieser Speicher gelöscht.
Es wäre hilfreich, wenn Sie das vollständige Skript und eine Beispieldatentabelle bereitstellen könnten.
Betreff: Kombination von For-Schleife und Dispatch()-Befehl in einem VariabilitätsdiagrammHallo Jim,
Etwas ist passiert, nachdem ich meinen Beitrag 4-5 Mal bearbeitet hatte. Die Website sagte, dass es überprüft werden muss, bevor es sichtbar wird, und dann verschwand es. Deshalb habe ich die Antwort nicht gesehen.
Tatsächlich habe ich nach dem Posten der ersten Frage etwas Dummes gemacht und es hat funktioniert, also dachte ich, ich hätte es geklappt. Aber dann habe ich festgestellt, dass es funktioniert, egal was ich nach Dispatch() schreibe (siehe unten).
Ich werde versuchen herauszufinden, was Eval, Expr und Substitute tatsächlich tun. Vielen Dank
For( q = 1, q <= kmax, q++,
Variability Chart(
Y( Datalist_log[q] ),
X( :wafernr ),
Max Iter( 100 ),
Conv Limit( 0.00000001 ),
Number Integration Abscissas( 128 ),
Number Function Evals( 65536 ),
Analysis Type( "Choose best analysis (EMS REML Bayesian)" ),
Std Dev Chart( 1 ),
Show Box Plots( 1 ),
Disp_String = concat Items ({VarChartText,Datalist_log[q]}), //This is useless
SendToReport(
Dispatch(Disp_stringxyuz12034823048, //Does not matter what I write here
"2",
ScaleBox,
{Scale( "Log" ), Format( "Scientific", 12 ), Min( 0.0000000001 ), Max( 0.000001 ), Inc( 1 ), Minor Ticks( 0 ),
Add Ref Line( UpperSpec_log[q], "Dotted", "Black", "USL", 2 )}
),
Dispatch(Disp_Stringsomethingelse,
"Variability Chart",
FrameBox,
{Frame Size( 600, 240 ), Marker Size( 1 ),
DispatchSeg( Box Plot Seg( 1 ), {Box Type( "Outlier" ), Line Color( "Red" ), Line Width( 2 )} ),
DispatchSeg( Box Plot S
...
...
...Betreff: Kombination von For-Schleife und Dispatch()-Befehl in einem VariabilitätsdiagrammHier ist eine Überarbeitung Ihres Codes mit einer sehr mächtigen Funktion in JSL, Substitution.Ich habe Ihre UpperSpec_log-Referenzzeile auskommentiert, da ich diese Liste nicht zur Verfügung hatte.Die Variability Chart Platform stellt diese Spezifikationsgrenzen jedoch automatisch dar, wenn Sie sie als Spalteneigenschaften zu Ihren Spalten hinzufügen, bevor Sie die Variability Chart Platform ausführen.Nachdem die Grenzwerte als Spalteneigenschaften hinzugefügt wurden, ermöglichen viele Plattformen die Anzeige der Spezifikationsgrenzwerte.
Hier ist mein überarbeiteter Code
Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA\Semiconductor Capability.jmp" );
Try(dt:Wafer << Set Name( "wafernr" ));
Datalist_log = {NPN1, PNP1, NPN2}; //first I define the list with the tests I Need. It needs to be like this in the code.
imax = N Items( Datalist_log );
//Boxplots
For( i = 1, i <= imax, i++,
Eval(
Substitute(
Expr(
Variability Chart(
Y( __DataList__ ), //Loop cycling through the list putting the respective column on the Y axis
X( :wafernr ),
Max Iter( 100 ),
Conv Limit( 0.00000001 ),
Number Integration Abscissas( 128 ),
Number Function Evals( 65536 ),
Analysis Type( "Choose best analysis (EMS REML Bayesian)" ),
Std Dev Chart( 1 ),
Show Box Plots( 1 ),
SendToReport(
Dispatch(
{__VarChart__},
// This is how it looks when it works.
//But I need to replace the hard coded string with an element from
//the list defined above as a part of the Loop, for example:
//{"Variability Chart for " || Datalist_log[i]},
//This is my most promising attempt. But I have failed to understand how the concat works.
//If i manually change the argument to
//{"Variability Chart for XYSomethingElse"}, the outcome is the same, meaning that the
//formatting commands (lot plot, scientific axis etc.) that follow are all ignored.
"2",
ScaleBox,
{Scale( "Log" ), Format( "Scientific", 12 ), Min( 0.0000000001 ), Max( 0.000001 ), Inc( 1 ), Minor Ticks( 0 )//,
//Add Ref Line( UpperSpec_log[i], "Dotted", "Black", "USL", 2 )
}
),
Dispatch(
{__VarChart__},
"Variability Chart",
FrameBox,
{Frame Size( 600, 240 ), Marker Size( 1 ), DispatchSeg(
Box Plot Seg( 1 ),
{Box Type( "Outlier" ), Line Color( "Red" ), Line Width( 2 )}
), DispatchSeg( Box Plot Seg( 2 ), {Box Type( "Outlier" ), Line Color( "Red" ), Line Width( 2 )} ),
DispatchSeg( Box Plot Seg( 3 ), {Box Type( "Outlier" ), Line Color( "Red" ), Line Width( 2 )} ),
DispatchSeg( Box Plot Seg( 4 ), {Box Type( "Outlier" ), Line Color( "Red" ), Line Width( 2 )} ),
DispatchSeg( Box Plot Seg( 5 ), {Box Type( "Outlier" ), Line Color( "Red" ), Line Width( 2 )} ),
DispatchSeg( Box Plot Seg( 6 ), {Box Type( "Outlier" ), Line Color( "Red" ), Line Width( 2 )} ),
DispatchSeg( Box Plot Seg( 7 ), {Box Type( "Outlier" ), Line Color( "Red" ), Line Width( 2 )} ),
DispatchSeg( Box Plot Seg( 8 ), {Box Type( "Outlier" ), Line Color( "Red" ), Line Width( 2 )} ),
DispatchSeg( Box Plot Seg( 9 ), {Box Type( "Outlier" ), Line Color( "Red" ), Line Width( 2 )} ),
DispatchSeg( Box Plot Seg( 10 ), {Box Type( "Outlier" ), Line Color( "Red" ), Line Width( 2 )} ),
DispatchSeg( Box Plot Seg( 11 ), {Box Type( "Outlier" ), Line Color( "Red" ), Line Width( 2 )} ),
DispatchSeg( Box Plot Seg( 12 ), {Box Type( "Outlier" ), Line Color( "Red" ), Line Width( 2 )} ),
DispatchSeg( Box Plot Seg( 13 ), {Box Type( "Outlier" ), Line Color( "Red" ), Line Width( 2 )} ),
DispatchSeg( Box Plot Seg( 14 ), {Box Type( "Outlier" ), Line Color( "Red" ), Line Width( 2 )} ),
DispatchSeg( Box Plot Seg( 15 ), {Box Type( "Outlier" ), Line Color( "Red" ), Line Width( 2 )} ),
DispatchSeg( Box Plot Seg( 16 ), {Box Type( "Outlier" ), Line Color( "Red" ), Line Width( 2 )} ),
DispatchSeg( Box Plot Seg( 17 ), {Box Type( "Outlier" ), Line Color( "Red" ), Line Width( 2 )} ),
DispatchSeg( Box Plot Seg( 18 ), {Box Type( "Outlier" ), Line Color( "Red" ), Line Width( 2 )} ),
DispatchSeg( Box Plot Seg( 19 ), {Box Type( "Outlier" ), Line Color( "Red" ), Line Width( 2 )} ),
DispatchSeg( Box Plot Seg( 20 ), {Box Type( "Outlier" ), Line Color( "Red" ), Line Width( 2 )} ),
DispatchSeg( Box Plot Seg( 21 ), {Box Type( "Outlier" ), Line Color( "Red" ), Line Width( 2 )} ),
DispatchSeg( Box Plot Seg( 22 ), {Box Type( "Outlier" ), Line Color( "Red" ), Line Width( 2 )} ),
DispatchSeg( Box Plot Seg( 23 ), {Box Type( "Outlier" ), Line Color( "Red" ), Line Width( 2 )} ),
DispatchSeg( Box Plot Seg( 24 ), {Box Type( "Outlier" ), Line Color( "Red" ), Line Width( 2 )} ),
DispatchSeg( Box Plot Seg( 25 ), {Box Type( "Outlier" ), Line Color( "Red" ), Line Width( 2 )} )}
),
Dispatch( {__VarChart__}, "", NomAxisBox, {Set Width( 573 ), Set Height( 21 )} ),
Dispatch( {__VarChart__}, "Varability Std Chart", FrameBox, {Frame Size( 559, 180 )} )
)
)
),
Expr( __DataList__ ), Parse( ":" || Char( DataList_Log[i] ) ),
Expr( __VarChart__ ), "Variability Chart for " || Char( DataList_Log[i] )
)
)
);