Integrazione di una stringa generata da loop con Graph BuilderSto avendo difficoltà a ottenere la sceneggiatura sottostante da eseguire. Io e sto cercando di creare grafici personalizzati usando il generatore di grafici. Voglio farlo in modo da creare un nuovo grafico in base alla quantità di dati analizzati e tracciare una mappa personalizzata che ho creato intorno a ciascun set di dati "wafer2" (la variabile con cui sto provando a farlo è chiamata "Dmaps"). Voglio anche che aggiusti la barra di scala in base alla ricetta di analisi scelta da un utente (questa parte della sceneggiatura funziona perfettamente ignorando i riferimenti "Dscale"). Quello a cui sto facendo fatica è ottenere che la stringa che sto generando con il mio ciclo for abbia la sintassi corretta o che la stringa si integri correttamente con lo script del compilatore di grafici. Qualcuno può dirmi cosa mi manca.
Grazie,
names default to here(1);
UniqueSlots = Associative Array( :Slot ) << get keys;
For( i = 1, i <= N Items( uniqueslots ), i++,
If( i == 1,
Dmaps = Eval("Dispatch( {}, \!"Graph Builder\!",FrameBox(" || Char( uniqueslots[i] ) || "),
{Background Map( Boundaries( \!"Wafer2\!" ) ), Marker Size( 3 ), Grid Line Order( 2 ),
Reference Line Order( 3 )})"
)
);
If( i < N Items( uniqueslots ),
Dmaps = Char( Dmaps ) || Eval(", Dispatch({}, \!"Graph Builder\!",FrameBox(" || Char( uniqueslots[i] ) || "),
{Background Map( Boundaries( \!"Wafer2\!" ) ), Marker Size( 3 ), Grid Line Order( 2 ),
Reference Line Order( 3 )})"
)
);
If( i == N Items( uniqueslots ),
Dmaps = Char( dmaps ) || Eval("Dispatch({}, \!"Graph Builder\!",FrameBox(" || Char( uniqueslots[i] ) || "),
{Background Map( Boundaries( \!"Wafer2\!" ) ), Marker Size( 3 ), Grid Line Order( 2 ),
Reference Line Order( 3 )})"
)
);
);
Show( dmaps );
Dscale = If( Contains( :SetupID[1], "0.026-0.2190um" ) > 0,
Parse( "[0.026 0.219]" ),
If( Contains( :SetupID[1], "0.026-0.2190umDSA" ) > 0,
Parse( "[0.026 0.219]" ),
If( Contains( :SetupID[1], "0.045-0.1421um" ) > 0,
Parse( "[0.045 0.1421]" ),
If( Contains( :SetupID[1], "0.046-0.1215um" ) > 0,
Parse( "[0.046 0.1215]" ),
If( Contains( :SetupID[1], "Post" ) > 0,
Parse( "[0.019 0.1297]" ),
If( Contains( :SetupID[1], "31-56.9nm" ) > 0,
Parse( "[0.031 0.0569]" )
)
)
)
)
)
);
Show( dscale );
script4 = Eval(
Parse(
"Graph Builder(
Size(
If( N Items( Associative Array( :Slot ) << get keys ) <= 16,
585,
1170
),
If( N Items( Associative Array( :Slot ) << get keys ) > 4,
50 * N Items( Associative Array( :Slot ) << get keys ) + Abs( 4 - Modulo( N Items( Associative Array( :Slot ) << get keys ), 4 ) ) /
4,
220
)
),
Show Control Panel( 0 ),
Show Footer( 0 ),
Continuous Color Theme( \!"Spectral\!" ),
Categorical Color Theme( \!"JMP Default\!" ),
Lock Scales( 1 ),
Title Fill Color( {221, 215, 204} ),
Title Frame Color( {221, 215, 204} ),
Level Fill Color( {233, 230, 226} ),
Level Frame Color( {221, 215, 204} ),
Variables(
X( :X ),
Y( :Y ),
Wrap(
:Slot,
Levels( N Items( Associative Array( :Slot ) << get keys ) ),
Levels per Row( If( N Items( Associative Array( :Slot ) << get keys ) <= 16, 4, 8 ) )
),
Overlay( :TIME ),
Color( :DSIZE )
),
Elements( Points( X, Y, Legend( 3 ) ) ),
SendToReport(
Dispatch(
{},
\!"X\!",
ScaleBox,
{Scale( \!"Geodesic\!" ), Min( -0.16 ), Max( 0.16 ), Inc( 0.05 ), Minor Ticks( 0 ), Label Row(
{Show Major Labels( 0 ), Show Major Ticks( 0 ), Show Minor Ticks( 0 )}
)}
),
Dispatch(
{},
\!"Y\!",
ScaleBox,
{Scale( \!"Geodesic\!" ), Format( \!"Best\!", 12 ), Min( -0.16 ), Max( 0.16 ), Inc( 0.05 ), Minor Ticks( 0 ),
Label Row( {Show Major Labels( 0 ), Show Major Ticks( 0 ), Show Minor Ticks( 0 )} )}
),
Dispatch(
{},
\!"400\!",
ScaleBox,
{Legend Model(
3,
Properties(
0,
{gradient(
{Color Theme( \!"Green Yellow Red\!" ), Scale Values(
"|| char(DScale) ||"
), Label Format( \!"Fixed Dec\!", 15, 3 ), N Labels( 5 )}
)}
)
)}
),
Dispatch( {}, \!"graph title\!", TextEditBox, {Set Text( :lot[1] )} ),
Dispatch( {}, \!"400\!", LegendBox, {Set Title( \!"\!" )} ),
"|| char(parse(Dmaps)) ||"));"
)
);
Ri: Integrazione di una stringa generata da loop con Graph BuilderGrazie, quel codice sembra molto più pulito.
Ho allegato i dati sampel insieme ai file della mappa personalizzata I (devono essere incollati in C: \ Programmi \ SAS \ JMP \ 13 \ Maps). Con le modifiche apportate allo script, ottengo un grafico senza mappe oltre al seguente errore:
Inaspettato ",". Forse manca ";" o ",".
Line 3 Column 32: ... ference Line Order (3)}) ►, Dispatch ({}, "Graph Bui ...
Il testo rimanente che è stato ignorato era
, Dispatch ({} "," Graph Builder, FrameBox (12), {Background Map (Boundaries "(" Wafer2)),
Dimensioni marcatore (3), ordine linea griglia (2), ordine linea di riferimento (3)}), invio ({} ","
Graph Builder, FrameBox (13), {Background Map (Boundaries "(" Wafer2)), Marker Size (3),
Grid Line Order (2), Reference Line Order (3)}) Dispatch ({} "," Graph Builder, FrameBox (
14), {Background Map (Boundaries "(" Wafer2)), Marker Size (3), Grid Line Order (2),
Ordine della linea di riferimento (3)})
Impossibile trovare FrameBox ["Graph Builder"] in {}
Graph Builder []
Ri: Integrazione di una stringa generata da loop con Graph BuilderHo esaminato la tua sceneggiatura e, senza avere alcuni dati di esempio con cui giocare, è necessario andare oltre quello che ho.
Ho trovato un errore logico, il tuo valore di Dmap non finirà mai con il valore impostato per il confronto di i == 1. Questo perché, la clausola If che la segue verrà eseguita anche quando i == 1, poiché quando i è uguale a 1, è anche inferiore a N Items (uniqueslots).
Suggerisco il seguente codice per ristrutturare quel codice:
If(
i == 1,
Dmaps = Eval(
"Dispatch( {}, \!"Graph Builder\!",FrameBox(" || Char( uniqueslots[i] ) ||
"),
{Background Map( Boundaries( \!"Wafer2\!" ) ), Marker Size( 3 ), Grid Line Order( 2 ),
Reference Line Order( 3 )})"
),
i < N Items( uniqueslots ),
Dmaps = Char( Dmaps ) || Eval(
", Dispatch({}, \!"Graph Builder\!",FrameBox(" || Char( uniqueslots[i] ) ||
"),
{Background Map( Boundaries( \!"Wafer2\!" ) ), Marker Size( 3 ), Grid Line Order( 2 ),
Reference Line Order( 3 )})"
),
i == N Items( uniqueslots ),
Dmaps = Char( dmaps ) || Eval(
"Dispatch({}, \!"Graph Builder\!",FrameBox(" || Char( uniqueslots[i] ) ||
"),
{Background Map( Boundaries( \!"Wafer2\!" ) ), Marker Size( 3 ), Grid Line Order( 2 ),
Reference Line Order( 3 )})"
)
);
/*);
If( i < N Items( uniqueslots ),
Dmaps = Char( Dmaps ) || Eval(", Dispatch({}, \!"Graph Builder\!",FrameBox(" || Char( uniqueslots[i] ) || "),
{Background Map( Boundaries( \!"Wafer2\!" ) ), Marker Size( 3 ), Grid Line Order( 2 ),
Reference Line Order( 3 )})"
)
);
If( i == N Items( uniqueslots ),
Dmaps = Char( dmaps ) || Eval("Dispatch({}, \!"Graph Builder\!",FrameBox(" || Char( uniqueslots[i] ) || "),
{Background Map( Boundaries( \!"Wafer2\!" ) ), Marker Size( 3 ), Grid Line Order( 2 ),
Reference Line Order( 3 )})"
)
);*/
);
Allo stesso modo, puoi eliminare tutti i tuoi IF nidificati nella tua seconda struttura If con il seguente
Dscale = If(
Contains( :SetupID[1], "BareSiPre0.026-0.2190um" ) > 0, Parse( "[0.026 0.219]" ),
Contains( :SetupID[1], "BareSiPst0.026-0.2190umDSA" ) > 0, Parse( "[0.026 0.219]" ),
Contains( :SetupID[1], "LTALDOX300A0.045-0.1421umDSA" ) > 0, Parse( "[0.045 0.1421]" ),
Contains( :SetupID[1], "ALDOX2500A0.046-0.1215umDSA" ) > 0, Parse( "[0.046 0.1215]" ),
Contains( :SetupID[1], "BKM_BareSi_19nmPost_OHS" ) > 0, Parse( "[0.019 0.1297]" ),
Contains( :SetupID[1], "LTALDOx180A31-56.9nm" ) > 0,
Parse( "[0.031 0.0569]" )
/*If( Contains( :SetupID[1], "BareSiPst0.026-0.2190umDSA" ) > 0,
Parse( "[0.026 0.219]" ),
If( Contains( :SetupID[1], "LTALDOX300A0.045-0.1421umDSA" ) > 0,
Parse( "[0.045 0.1421]" ),
If( Contains( :SetupID[1], "ALDOX2500A0.046-0.1215umDSA" ) > 0,
Parse( "[0.046 0.1215]" ),
If( Contains( :SetupID[1], "BKM_BareSi_19nmPost_OHS" ) > 0,
Parse( "[0.019 0.1297]" ),
If( Contains( :SetupID[1], "LTALDOx180A31-56.9nm" ) > 0,
Parse( "[0.031 0.0569]" )
)
)
)
)
)*/
);