- status: open --> closed-fixed
I just noticed that the documentation has not a word to say about the
new "fit" options to handle columns containing data error estimates,
added back in Feb 2014.
https://sourceforge.net/p/gnuplot/patches/585/?page=1
The file fit.c itself contains the following comment:
But I don't think that comment is correct. I gather from looking at the code
and the fit demo that the expected syntax is
fit $DATA using <using-spec> {xerror | yerror | zerror | xyerror}
The keyword "errors" is also parsed, but nothing I put after that is accepted
so I obviously don't understand how to use this option. For instance
(from the demo)
# this works fit fxy(x) $PearsonYork using 2:4:(sqrt(1./$3)):(sqrt(1./$5)) xyerr via a1xy, a2xy # this doesn't work; clearly the variable accounting is bad fit fxy(x) $PearsonYork using 2:4:(sqrt(1./$3)):(sqrt(1./$5)) errors x,y via a1xy, a2xy >>> Not enough columns in using spec. At least 7 are required for this error spec fit fxy(x) $PearsonYork using 2:4:(sqrt(1./$3)):(sqrt(1./$5)) errors x,y via a1xy, a2xy >>> Not enough columns in using spec. At least 9 are required for this error spec
Clearly num_errors is not getting re-initialized to 0, but even if I add that to the
code I still can't make the "errors x,y" to work. It either gives a non-helpful message
or segfaults.
fit fxy(x) $PearsonYork using 2:4:(sqrt(1./$3)):(sqrt(1./$5)) errors x,y via a1xy, a2xy >>> Not enough columns in using spec. At least 13 are required for this error spec fit fxy(x) $PearsonYork using 2:4:(sqrt(1./$3)):(sqrt(1./$5)):(1) errors x,y via a1xy, a2xy Segmentation fault
I'll mark this as an unresolved issue in version 5.0.rc2 rather than holding it up,
but it would be nice to get a fix and some documentation.