Combining Curve fitting plots with other plots

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Combining Curve fitting plots with other plots

alexra
Hello
I am trying to get a combined plot of data in my results table and a plot of a fit function in my ImageJ macro.  I managed to get my results plotted (several x,y data sets in one plot window) and I get the graphic fit function of one data set (x,y).  Now I want to combine these into one plot that shows the original data (several line plots) together with the calculated fit function.  
I tried the macro recorder, but when I press the list bottom to get the values this is not recorded.  So is there a way to address/access the x,y values from the fit function and can they be read into an array to be plotted in the other plot?

Many thanks
Alex
Reply | Threaded
Open this post in threaded view
|

Re: Combining Curve fitting plots with other plots

Rasband, Wayne (NIH/NIMH) [E]
On Jul 9, 2010, at 10:01 AM, alexra wrote:

> Hello
> I am trying to get a combined plot of data in my results table and a plot of
> a fit function in my ImageJ macro.  I managed to get my results plotted
> (several x,y data sets in one plot window) and I get the graphic fit
> function of one data set (x,y).  Now I want to combine these into one plot
> that shows the original data (several line plots) together with the
> calculated fit function.  
> I tried the macro recorder, but when I press the list bottom to get the
> values this is not recorded.  So is there a way to address/access the x,y
> values from the fit function and can they be read into an array to be
> plotted in the other plot?

You can plot the calculated fit function by using the Fit.f(x) macro function. There is an example at

     http://rsbweb.nih.gov/ij/macros/examples/PlotSigmoidDerivatives.txt

-wayne
Reply | Threaded
Open this post in threaded view
|

Re: Combining Curve fitting plots with other plots

alexra
Dear Wayne,
thank you very much, exactly what I was locking for.  Maybe you could add a link to the fit.f(x) section on http://rsbweb.nih.gov/ij/developer/macro/functions.html.
Best wishes
alexra