|
From: Tatsuro M. <tma...@ya...> - 2010-02-13 05:57:53
|
Hello
--- Ethan Merritt wrote:
> > k=0
> > plot [0:1] [-1:] k=0, \
> > k*x t '0x' w lp lt 1, k=k+1, \
> > k*x t '1x' w lp lt 2, k=k+1, \
> > k*x t '2x' w lp lt 3
> >
> > Now, if you remove the initial 'k=0, \' part of the plot-command - the
> > '0x'-line is plotted as 2*x, the '1x'-line as 3*x and '2x'-line as 4*x. Can
> > this be related to the two 'k=k+1' for some strange reason? In deed, adding
> > a third 'k=k+1' leads the first '0x'-line to be plotted as 3*x! This is
> > clearly a bug since k is expected as zero for the first line to be plotted,
> > '0x'.
> >
> > I therefore think there are two issues here:
> > 1) The issue reported as Bug #2907028 and
> > 2) the issue reported by me here, that version 4.4 does not allow an
> > increment as the last statement of a plot-command.
>
> The 4.0 and 4.2 documentation gives:
> Syntax:
> plot {<ranges>}
> {<function> | {"<datafile>" {datafile-modifiers}}}
> {axes <axes>} {<title-spec>} {with <style>}
> {, {definitions,} <function> ...}
>
> which means that definitions can come before a function, but not after.
> So I think you have been depending on undocumented, probably unintended,
> behavior.
>
> It may well be that some earlier versions did accept a trailing
> definition, but since it was not documented no one was testing for this
> as the code evolved.
>
> If there were no better way to accomplish what you were doing, I would
> agree that it was a bug and should be fixed. But since this can now be
> done more conveniently in 4.4 using iteration, I don't see much incentive
> to go back and reconstruct how earlier versions worked on an undocumented
> command syntax.
>
> What do others think? Is there good reason to rework the code to allow
> this, and change the documentation to match?
>
> Ethan
I have not know the such syntax can be used for gnuplot. I have been used external awk script, which
produce the gnuplot scripts, if iteration has been required.
The iteration feature of 4.4 is very nice and useful. In my idea, the old undocumented syntax needs
not to be fixed because there appears more convenient implementation for iteration. If one would like
to use the syntax, the fix should be done by oneself.
Regards
Tatsuro
--------------------------------------
VANCOUVER 2010 Olympic News [Yahoo! Sports/sportsnavi]
http://pr.mail.yahoo.co.jp/olympic/
|