#### 3.25.21 fit

The fit setting defines where the fit command writes its output.

Syntax:

          set fit {logfile {"<filename>"}} {{no}errorvariables} {{no}quiet}
          unset fit
          show fit

The <filename> argument must be enclosed in single or double quotes.

If no filename is given or fit is used the log file is reset to its default value "fit.log" or the value of the environmental variable ‘FIT_LOG‘.

If the given logfile name ends with a / or \, it is interpreted to be a directory name, and the actual filename will be "fit.log" in that directory.

If the ‘errorvariables‘ option is turned on, the error of each fitted parameter computed by fit will be copied to a user-defined variable whose name is formed by appending "_err" to the name of the parameter itself. This is useful mainly to put the parameter and its error onto a plot of the data and the fitted function, for reference, as in:

           set fit errorvariables
           fit f(x) 'datafile' using 1:2 via a, b
           print "error of a is:", a_err
           set label 'a=%6.2f', a, '+/- %6.2f', a_err
           plot 'datafile' using 1:2, f(x)

By default the information written to the log file is also echoed to the terminal session. ‘set fit quiet‘ turns off the echo.