Posted by
bnorthan on
Mar 31, 2014; 10:27am
URL: http://imagej.273.s1.nabble.com/Running-a-Gaussian-Fit-in-a-Beanshell-Script-tp5007134p5007143.html
Hi Burni
You can access the plot function of the plugin.
http://rsb.info.nih.gov/ij/developer/source/ij/plugin/frame/Fitter.java.htmlYou need to pass the plot function the CurveFitter instance. This line
should do it -
ij.plugin.frame.Fitter.plot(fitter);
//////////////////////////////////////////////////////////////////////////
double[] x = new double [] {0, 1, 2, 3, 4, 5};
double[] y = new double [] {0, 0.9, 4.5, 8, 18, 24};
CurveFitter fitter=new CurveFitter(x, y);
fitter.doFit(1);
double[] results=fitter.getParams();
for (double d:results)
{
print(d);
}
ij.plugin.frame.Fitter.plot(fitter);
On Mon, Mar 31, 2014 at 5:31 AM, Burni <
[hidden email]> wrote:
--
ImageJ mailing list:
http://imagej.nih.gov/ij/list.html