Hallo zusammen,
Ich habe eine Funktion, die der von mir benötigten ähnlich ist, aber mit Group bis dahin Spline anpassen. Ich muss also die Diagramme mit verschiedenen Gruppierungen haben: Typ, Grpcolor und BP. Bei der angegebenen Funktion habe ich nur die grpcolor als Gruppierung. Was ich aber brauche, sind diese drei Parameter (Typ, Nummer, BP). Wie kann ich diesen Code in eine ähnliche Funktion wie unten konvertieren?
Handlungsbeispiel:
Bivariate( Y( :Cal_I_Jmp ), X( :STO_DCR_TS_LES ),
Fit Where( :BP == "20nm", Fit Spline( 1000, {Line Color( {212, 73, 88} )} ) ),
Fit Where( :BP == "35nm", Fit Spline( 1000, {Line Color( {61, 174, 70} )} ) ),
Fit Where( :BP == "50nm", Fit Spline( 1000, {Line Color( {66, 112, 221} )} ) ),
SendToReport(
Dispatch(
{},
"Bivar Plot",
FrameBox,
{Row Legend(
BP,
Color( 1 ),
Color Theme( "JMP Default" ),
Marker( 0 ),
Marker Theme( "" ),
Continuous Scale( 0 ),
Reverse Scale( 0 ),
Excluded Rows( 0 )
)}
)
)
);Hier ist die Funktion:
bivpolyfit = Function( { x_param, y_param, grouping },
biv = Bivariate( Y( Column( y_param ) ), X( Column( x_param ) ), GroupBy( Column( grouping ) ),
<< Fit Polynomial( 2, {Line Width( 2 )}));
rbiv = biv << Report;
rbiv[Framebox( 1 )] << {Marker Size( 3 )};
rbiv[Axisbox( 2 )] << Tick Font( style( 0 ), size( 9 ) ) << Show Major Grid( 1 ) << Show Minor Grid( 1 ) << Show Minor Ticks( 1 ) << {Min( eval(xmin[j]) ), Max( eval(xmax[j]) )/*, Inc( incr[j] )*/};
rbiv[Axisbox( 1 )] << Tick Font( style( 0 ), size( 9 ) ) << Show Major Grid( 1 ) << Show Minor Grid( 1 ) << Show Minor Ticks( 1 ) << {Min( eval(ymin[j]) ), Max( eval(ymax[j]) )/*, Inc( incr[j] )*/};
rbiv[TextEditBox( 2 )] << Set Font Size( 10 ) << Set Font Style( "Bold" );
rbiv[TextEditBox( 1 )] << Set Font Size( 10 ) << Set Font Style( "Bold" );
rbiv[Outline Box( 1 )] << Set Title( y_param||" vs "||x_param );
rbiv["Polynomial Fit Degree=2 ?"] << Close All Like This;
rbiv[Framebox( 1 )] << Row Legend( Column( grouping ), Color( 1 ), Marker( 0 ), Color Theme("JMP Default"), Continuous Scale( 0 ) );
rbiv[Framebox( 1 )] << Row Legend( Column( rdr ), Color( 0 ), Marker( 1 ), Marker Theme("Solid") );
rbiv[BorderBox(3)] << Delete;
rbiv[BorderBox(2)] << Delete;
pbiv = rbiv[OutlineBox( 1 )] << get picture;ppt9 = OutlineBox("IJMP");
yparam = { "Cal_I_Jmp", "Cal_I_Jmp", "Cal_I_Jmp","Cal_I_Jmp"};
xparam = { "STO_DCR_TS_LES", "STO_DCR_TS_MP", "STO_R", "STO_TS"};
lb = LineupBox(NCol(4));
For(j=1, j<=nitems( xparam ), j++,
bivpolyfit( xparam[j], yparam[j], grpcolor );
lb << append(pbiv);
biv << Close Window;
);
ppt9 << append(lb << get picture);
transdt << Clear;