|
From: Pieter-Tjerk de B. <p.t...@ut...> - 2014-06-15 19:18:30
|
On Fri, Jun 06, 2014 at 11:03:52AM -0700, Ethan A Merritt wrote:
> > * The fit command in some cases interprets one column as errors, for
> > compatibility with pre-5.0 versions, according to `help fit`.
> > Perhaps it's an idea to change this, making 'noerror' the default,
> > since 5.0 isn't supposed to be fully compatible anyway?
> > That seems more systematic: then the error column is only there when
> > explicitly indicated, and it makes the 'using' specification in case
> > of 2 independent variables similar to what the user expects from splot.
>
> I find myself somewhat by the new keywords also.
> The v5 docs appear contradictory.
Hmm, indeed.
And there's more: it doesn't even describe the new `errors` keyword,
nor the new possibilities it offers (namely giving error estimates not
only for the dependent but also for the independent variables). The
rest of the text seems a bit confused; one sentence actually appears
twice in two different paragraphs ("there must be two more `using`
... one variable").
> which appears to say that "noerror" is _not_ the default, at least for the 3D
> case. Hence my confusion. Do the keywords mean different things in
> the 2D, 3D, and ND cases?
As far as I could find out, they mean the same.
Actually, "xerror", "yerror" and "zerror" are effectively all the same
as "errors z", only for different cases.
> For me the most useful statement in the v5 docs was that the "yerror"
> keyword made fit work analogously to "plot with yerrorbars".
Same for "xyerror" and "with xyerrorbars"; but "xerror" is _not_
analogous to "with xerrorbars".
In fact, I wonder whether it wouldn't be better to remove "xerror",
since it doesn't seem to have much purpose, and may be confusing.
While playing around with this, I also ran into a few bugs that
were due to variables not being properly reinitialized:
- repeatedly giving a command like:
fit a*x+b 'tt.dat' u 1:2:3 errors x,z via a,b
gives different error messages each time;
- the command:
fit a*x+b 'tt.dat' u 1:2:3 errors x via a,b
complains (rightfully) that z errors need to be given, but doesn't
complain about it if one previously issued a fit command that _did_
have z errors.
> Perhaps either the documentation or the keywords themselves could
> be made to match better with "plot/splot" commands?
Attached is a patch which makes the following changes:
- proper initialization of err_cols and num_errors;
- noerror is now the default; this is incompatible with pre-5.0, but
makes things more systematic (and match better with the splot command
in case of 3D-fits);
- rewrite of the `fit` documentation, to match the new default meaning
of the data columns, to explain the new errors options, and also to
improve clarity on a few other aspects.
But of course, I don't know whether there is consensus about breaking
compatibility with pre-5.0 this way.
Regards,
Pieter-Tjerk
|