Ho una sceneggiatura per tracciare che funziona. Ho aggiunto la funzione "Per" e non funziona più.
Il messaggio di errore è
FrameBox in access or evaluation of '<FONT color="#FF6600">FrameBox</FONT>'
Ecco lo script di lavoro originale prima della modifica.
CodeBlk=Expr(
colname = {"Column1", "Column2", "Column3"};
colabrv = {};
For (i=1, i<=Nitems(colname), i++, colabrv=Insert(colabrv,"Var"||Char(i)));
all_col = dtable << get column names( string );
If(!Contains(all_col, "Column_Grp"),
dtable << New Column ("Column_Grp",<BR /> Formula(If(:Tester_MD=="Tester1", "Tester1", "Other Testers")));
);
New Window("GRAPHS", Lineup Box(Ncol(2),
For( n = 1, n <= Nitems(colname), n++,
plotswp = "current data table(subdt);" ||<BR /> colabrv[n]||"_Max = col quantile( :Name( \!"" || colname[n] ||"\!" ), 0.5 )+(2*col Std Dev( :Name( \!"" || colname[n] ||"\!" ) ));"||<BR /> colabrv[n]||"_Min = col quantile( :Name( \!""||colname[n]||"\!" ), 0.5 )-<BR /> (2*col Std Dev( :Name( \!"" || colname[n] ||"\!" ) ));" ||<BR /> colabrv[n] || "_Step = Std Dev( :Name( \!""|| colname[n] || "\!" ) );" ||
"current data table(dtable);" ||<BR /> colabrv[n] ||"_Plot = Bivariate (Y( :Name( \!"" || colname[n] ||"\!" ) ), <BR /> X( :Name( \!"XColumn\!" ) ),group by (groupcol),<BR /> Fit Spline(1000));";
For( c = 1, c <= GroupListN, c++,<BR /> If(Right( GroupList[c], 3 ) == "OFF",<BR /> plotswp = plotswp || colabrv[n] ||"_Plot << (Curve[" || Char( c ) ||"]<BR /> << Line Style( Dashed ));",Right( GroupList[c], 3 ) == "ON",
plotswp = plotswp || colabrv[n] ||"_Plot << (Curve[" || Char( c ) ||"] << Line Width( 3 ));"));
plotswp2 = plotswp || colabrv[n] || "_Plot_r =" || colabrv[n]
|| "_Plot<<REPORT></REPORT> << Tick Font (style (1), size (12) << Show Major Grid (1)<BR /> << Show Minor Grid (0) << Show Minor Ticks (1);
Xaxis = " || colabrv[n] || "_Plot_r[Text Edit Box(2)]<BR /> << Set Font Size( 12 ) << Set Font Style( \!"Bold\!" ) ;
Yaxis << Max ("|| colabrv[n] || "_Max) << Min (" || colabrv[n] ||
"_Min) << Inc (" || colabrv[n] ||"_Step) <BR /> << Tick Font (style (1), size (12))
<< Show Major Grid (1) << Show Minor Grid (0)<BR /> << Show Minor Ticks (1);
Yaxis = "|| colabrv[n] ||"_Plot_r[Text Edit Box(1)] << Set Font Size( 12 )<BR /> << Set Font Style( \!"Bold\!" ) ; "
||colabrv[n]||"_Plot_Frame << {Frame Size( 240, 190 ), Marker Size( 1 ),<BR /> Line Width Scale( 3 )} ;";
plotswp2 = Eval( Parse( plotswp2 ) );
);
)
);
);Ecco lo script modificato. Non riesco a controllare il colore del carattere, ma quello che ho aggiunto è stata questa parte " By (: ColumnGrp) "Tutto il resto era lo stesso.
CodeBlk=Expr(
colname = {"Column1", "Column2", "Column3"};
colabrv = {};
For (i=1, i<=Nitems(colname), i++, colabrv=Insert(colabrv,"Var"||Char(i)));
all_col = dtable << get column names( string );
If(!Contains(all_col, "Column_Grp"),
dtable << New Column ("Column_Grp",<BR /> Formula(If(:Tester_MD=="Tester1", "Tester1", "Other Testers")));
);
New Window("GRAPHS", Lineup Box(Ncol(2),
For( n = 1, n <= Nitems(colname), n++,
plotswp = "current data table(subdt);" ||<BR /> colabrv[n]||"_Max = col quantile( :Name( \!"" || colname[n] ||"\!" ), 0.5 )+(2*col Std Dev( :Name( \!"" || colname[n] ||"\!" ) ));"||<BR /> colabrv[n]||"_Min = col quantile( :Name( \!""||colname[n]||"\!" ), 0.5 )-<BR /> (2*col Std Dev( :Name( \!"" || colname[n] ||"\!" ) ));" ||<BR /> colabrv[n] || "_Step = Std Dev( :Name( \!""|| colname[n] || "\!" ) );" ||
"current data table(dtable);" ||<BR /> colabrv[n] ||"_Plot = Bivariate (Y( :Name( \!"" || colname[n] ||"\!" ) ), <BR /> X( :Name( \!"XColumn\!" ) ),group by (groupcol),<BR /> <STRONG><FONT color="#FF0000"> By(:ColumnGrp)</FONT></STRONG>, Fit Spline(1000));";
For( c = 1, c <= GroupListN, c++,<BR /> If(Right( GroupList[c], 3 ) == "OFF",<BR /> plotswp = plotswp || colabrv[n] ||"_Plot << (Curve[" || Char( c ) ||"]<BR /> << Line Style( Dashed ));",Right( GroupList[c], 3 ) == "ON",
plotswp = plotswp || colabrv[n] ||"_Plot << (Curve[" || Char( c ) ||"] << Line Width( 3 ));"));
plotswp2 = plotswp || colabrv[n] || "_Plot_r =" || colabrv[n]
|| "_Plot<<REPORT></REPORT> << Tick Font (style (1), size (12) << Show Major Grid (1)<BR /> << Show Minor Grid (0) << Show Minor Ticks (1);
Xaxis = " || colabrv[n] || "_Plot_r[Text Edit Box(2)]<BR /> << Set Font Size( 12 ) << Set Font Style( \!"Bold\!" ) ;
Yaxis << Max ("|| colabrv[n] || "_Max) << Min (" || colabrv[n] ||
"_Min) << Inc (" || colabrv[n] ||"_Step) <BR /> << Tick Font (style (1), size (12))
<< Show Major Grid (1) << Show Minor Grid (0)<BR /> << Show Minor Ticks (1);
Yaxis = "|| colabrv[n] ||"_Plot_r[Text Edit Box(1)] << Set Font Size( 12 )<BR /> << Set Font Style( \!"Bold\!" ) ; "
||colabrv[n]||"_Plot_Frame << {Frame Size( 240, 190 ), Marker Size( 1 ),<BR /> Line Width Scale( 3 )} ;";
plotswp2 = Eval( Parse( plotswp2 ) );
);
)
);
);Se rimuovo la parte FrameBox, lo script funziona. Ma ho bisogno di quella parte per personalizzare i miei grafici; Non posso cancellarlo
CodeBlk=Expr(
colname = {"Column1", "Column2", "Column3"};
colabrv = {};
For (i=1, i<=Nitems(colname), i++, colabrv=Insert(colabrv,"Var"||Char(i)));
all_col = dtable << get column names( string );
If(!Contains(all_col, "Column_Grp"),
dtable << New Column ("Column_Grp",<BR /> Formula(If(:Tester_MD=="Tester1", "Tester1", "Other Testers")));
);
New Window("GRAPHS", Lineup Box(Ncol(2),
For( n = 1, n <= Nitems(colname), n++,
plotswp = "current data table(subdt);" ||<BR /> colabrv[n]||"_Max = col quantile( :Name( \!"" || colname[n] ||"\!" ), 0.5 )+(2*col Std Dev( :Name( \!"" || colname[n] ||"\!" ) ));"||<BR /> colabrv[n]||"_Min = col quantile( :Name( \!""||colname[n]||"\!" ), 0.5 )-<BR /> (2*col Std Dev( :Name( \!"" || colname[n] ||"\!" ) ));" ||<BR /> colabrv[n] || "_Step = Std Dev( :Name( \!""|| colname[n] || "\!" ) );" ||
"current data table(dtable);" ||<BR /> colabrv[n] ||"_Plot = Bivariate (Y( :Name( \!"" || colname[n] ||"\!" ) ), <BR /> X( :Name( \!"XColumn\!" ) ),group by (groupcol),<BR /> <STRONG><FONT color="#FF0000"> By(:ColumnGrp)</FONT></STRONG>, Fit Spline(1000));";
For( c = 1, c <= GroupListN, c++,<BR /> If(Right( GroupList[c], 3 ) == "OFF",<BR /> plotswp = plotswp || colabrv[n] ||"_Plot << (Curve[" || Char( c ) ||"]<BR /> << Line Style( Dashed ));",Right( GroupList[c], 3 ) == "ON",
plotswp = plotswp || colabrv[n] ||"_Plot << (Curve[" || Char( c ) ||"] << Line Width( 3 ));"));
plotswp2 = plotswp || colabrv[n] || "_Plot_r =" || colabrv[n]
|| "_Plot<<REPORT></REPORT> << Tick Font (style (1), size (12) << Show Major Grid (1)<BR /> << Show Minor Grid (0) << Show Minor Ticks (1);
Xaxis = " || colabrv[n] || "_Plot_r[Text Edit Box(2)]<BR /> << Set Font Size( 12 ) << Set Font Style( \!"Bold\!" ) ;
Yaxis << Max ("|| colabrv[n] || "_Max) << Min (" || colabrv[n] ||
"_Min) << Inc (" || colabrv[n] ||"_Step) <BR /> << Tick Font (style (1), size (12))
<< Show Major Grid (1) << Show Minor Grid (0)<BR /> << Show Minor Ticks (1);
Yaxis = "|| colabrv[n] ||"_Plot_r[Text Edit Box(1)] << Set Font Size( 12 )<BR /> << Set Font Style( \!"Bold\!" ) ; "
||colabrv[n]||"_Plot_Frame << {Frame Size( 240, 190 ), Marker Size( 1 ),<BR /> Line Width Scale( 3 )} ;";
plotswp = Eval( Parse( plotswp ) );
);
)
);
);Ho controllato che l'indice FrameBox è stato modificato ma è sempre lo stesso.
Qualche idea su come eseguire il debug di questo?
Grazie.