Curve Fit Destination Overwritten [was Problem with mutiple-graph]
lyggd
I try to make several scatter plots and curve fitting each one.
But every-time I fit one, the fitting line on other graph with also changed. Please check the file I attached.
Is there anyone can help me to solve this problem ?
Thank you very much.
Best Wishes
March 21, 2014 at 02:27 pm - Permalink
Hello Hrodstein,
Sorry I still did not get it.
How to rename the destination wave after each curve fit ?
Would you give me more details ?
Thank you very much.
Yi
March 21, 2014 at 04:40 pm - Permalink
Rename fit_FC_W, fit_FC_W_vs_LD
Then when you do the next fit it won't overwrite the fit curve created by the previous fit.
You can also use Data->Rename and use the Rename Objects dialog.
John Weeks
WaveMetrics, Inc.
support@wavemetrics.com
March 21, 2014 at 05:16 pm - Permalink
The CurveFit operation /D flag automatically generates a destination wave named after the Y wave. In this case the automatic destination wave is fit_FC_W for both fits. Therefore the second CurveFit overwrites the destination from the first CurveFit.
The solution is to rename the destination wave with a unique name after each fit.
Before you start with that, execute these commands to fix the name of the righthand graph:
DoWindow/C FC_W_VS_GC // Change name of righthand graph to FC_W_VS_GC
Now execute these commands to remove the fit_FC_W from both graphs:
RemoveFromGraph/W=FC_W_VS_GC fit_FC_W
Now execute these commands to target the left graph, do the fit, and rename the destination wave:
CurveFit/X=1/H="10"/NTHR=1 line FC_W /X=LD /D
Rename fit_FC_W, fit_FC_W_LD
Now execute these commands to target the right graph, do the fit, and rename the destination wave:
CurveFit/X=1/H="10"/NTHR=1 line FC_W /X=GC /D
Rename fit_FC_W, fit_FC_W_GC
Now you have two destination waves with unique names.
If you want to redo the fit, for example the first fit, you must rename the destination wave back to the default name, do the fit, and then rename it to the unique name. Execute these commands:
Rename fit_FC_W_LD, fit_FC_W
fit_FC_W = 0 // This is not really necessary
CurveFit/X=1/H="10"/NTHR=1 line FC_W /X=LD /D
Rename fit_FC_W, fit_FC_W_LD
March 21, 2014 at 06:20 pm - Permalink
Thank you so much for the detail instruction !
I am very appropriated !
Yi
March 24, 2014 at 09:01 am - Permalink