I am doing a non linear fit model that has 7 data points that always range from 500 to 1700. The plots show up with the X axis as being from -250 to 1750. How can I set the x axis to be 540 to 1750? I have tried by accessing the axis box(2) and ScaleBox but the log always says that it cannot find it. Here is what I currently have.
dt << New Column( "Model", formula( Parameter( {L = 850, D = 4000, U =0.1}, (((1 - U) / 2) * (cos(pi()*(:BarLength / L)) + 1) + U) * exp(-1*(:BarLength / D)))));
dt << Select Where( :SiteColumn == "J" ) << Exclude << Hide;
titlex = wf || "_PSPP_FIT";
MES1 = New Window( titlex,
nl = dt << Nonlinear(
Y( :NormTrans ),
X( :Model ),
xaxis = nl[axis box( 2 )],
xaxis << Axis Settings(Max(1750), Min(450)),
Parameter Bounds( L( 500, 1300 ), D( 200, 20000 ), U( 0, 1 ) ),
By( :FlashField, :ReqWaveLn ),
SendToReport(
Dispatch( {}, "Control Panel", OutlineBox, {Close( 1 )} ),
Dispatch( {"Plot"}, "1" , ScaleBox,{Min( 450 ), Max( 1750 ), Inc( 500 ), Minor Ticks( 1 )})
//Dispatch( {}, "1", ScaleBox, {Inc( 250 ), Minor Ticks( 1 )} )
//Dispatch( {}, "1", axis box(2), {Min( 450 ), Max( 1750 ), Inc( 250 ), Minor Ticks( 1 )} )
//Dispatch( {"Plot"}, "Nonlinear Graph", FrameBox, {Frame Size( 378, 262 )} ),
//Dispatch( {}, "Solution", OutlineBox, {Close( 1 )} )
)
);
nl << finish;
);
What is weird is if I manually adjust the axis and then copy the script it shows up exactly how it shows above. Manually changing the axis on one of the plots and copying the script shows as this:
Nonlinear(
Y( :NormTrans ),
X( :Model ),
Parameter Bounds( L( 500, 1300 ), D( 200, 20000 ), U( 0, 1 ) ),
Newton,
Finish,
Where( :FlashField == "CF1" & :ReqWaveLn == 769.1172 ),
SendToReport(
Dispatch( {}, "Control Panel", OutlineBox, {Close( 1 )} ),
Dispatch(
{"Plot"},
"1",
ScaleBox,
{Min( 450 ), Max( 1750 ), Inc( 500 ), Minor Ticks( 1 )}
)
)
)