With patch #585, fit will be able to handle errors in the independent variables x,y,t,u,v in addition to errors in the dependent variable z. Since the additional errors are (and have to be) all optional, the number of columns of the using spec can no longer be used as sole means to determine the type of fit, see Tables 1 and 3 below. But even with current syntax there exist two conflicts which lead to confusion and FAQs, see Table 2.

The attached patch therefore implements the following scheme to extend current syntax:

fit ... using ... noerrors | errors [x][y][t][u][v]z ...

The option "noerrors" indicates that no errors in dep. and indep. variables are given.

The option "errors" names the type of error columns given.

The order of the using specs is fixed and--for the most common cases--matches the corresponding plot/splot command. To mimic the syntax of the plot command even more, "xerror", "yerror" and "xyerror" are accepted as aliases for "errors x", "errors y", "errors xy", see Tables 4, 5, and 6. "zerror" is an alias for "errors z".

The current syntax is still supported for backwards compatibility.

Table 1: Allowed using specs according to current syntax; s is the error of the dep. variable z.

cols spec
1 z
2 x:z
3 x:z:s
4 x:y:z:s
5 x:y:t:z:s
6 x:y:t:u:z:s
7 x:y:t:u:v:z:s

Table 2: Cases not handled by current syntax

cols spec
2 z:s ambiguity with x:z, use (0):z:s instead
3 x:y:z ambiguity with x:z:s, use x:y:z:(1) instead

Table 3: With optional errors in the indep. variables, the total number of columns can no longer be used alone to determine the type of each column.

cols spec
4 x:z:sx:sz
5-6 x:y:z[:sx][:sy]:sz
6-8 x:y:t:z[:sx][:sy][:st]:sz
7-10 x:y:t:u:z[:sx][:sy][:st][:su]:sz
8-12 x:y:t:u:v:z[:sx][:sy][:st][:su][:sv]:sz

Table 4: New syntax: Without weights

fit ... using x|z noerror
fit ... using x:z|y noerror
fit ... using x:y:z noerror
fit ... using x:y:t:z noerror
...
fit ... using x:y:t:u:v:z noerror

Table 5: New syntax: With weights, z-errors only

fit ... using x|z:s errors z | zerror | xerror
fit ... using x:y|z:s errors z | zerror | yerror
fit ... using x:y:z:s errors z | zerror
...
fit ... using x:y:t:u:v:z errors z | zerror

Table 6: New sytax: With weights, indep. & dep. errors

fit ... using x:z:sx:sz errors xz | xyerror
fit ... using x:y:z[:sx][:sy]:sz errors [x][y]z
...
fit ... using x:y:t:u:v:z[:sx][:sy][:st][:su][:sv]:sz errors [x][y][t][u][v]z