Hans-Bernhard Broeker <br...@ph...> schrieb am 22.07.04 04:08:18:
>
> gnuplot> set arrow 1 from x, y to x, a(0)
> gnuplot> show arrow
>
> arrow 1, linetype 1, linewidth 1.000 nofilled back
> from (2, 1, 0) to (2, 2, 0)
>
> In the light of this, I hope you can see how the only part about your
> proposal I really don't agree with is the fact that it introduces late
> evaluation only for strings. I do agree that late evaluation is a useful
> tool to add. But I disagree about it being useful for strings _only_.
>
That's a clear example why I think "late evaluation" as proposed is
a bad idea for the users: Labels might change their text, but stay
at the same location, even if text and location "depend" on the
same variable:
gnuplot> a=0
gnuplot> set label sprintf("Center: %g",a) at a,1
gnuplot> plot [some function with a as parameter]
gnuplot> fit [fuction of a] [some datafile] via a,...
gnuplot> replot
The second plot would have a label at 0,1 with
text "Center 3.2" if fitting a would yield a=3.2.
At least, thats how I (and I think HBB too) understood "late evaluation".
This seems very convienient for the user: He needs just _one_
set title sprintf("Fited: a=%g, b=%g",a,b), do some fitting and issue
replots and the titles will reflect the values.
But is it really such a burden to copy the
"set title sprintf('Fited: a=%g, b=%g',a,b)" before each replot?
I think no. It anyway would confuse users if this "late evaluation"
happened only for the text string, and not the position of the label.
I agree with Hans-Bernhard, that a _full_ "late evalaution" with
special syntax would be a nice feature. But as stated: It should be
clear from syntax, that this string/real/integer-value will be
re-evaluated each time this cunstruct is beeing output to the
device.
From my personal usage of gnuplot, I have to admit, that I do
not see, why something like
gnuplot> f(x) = sprintf("%7.5f",x)
is necesseary. What problem can be solved by this user-defined
function which cannot (or at least not eaily) be solved by other
means?
Volker
--
Volker Dobler
________________________________________________________________
Verschicken Sie romantische, coole und witzige Bilder per SMS!
Jetzt neu bei WEB.DE FreeMail: http://freemail.web.de/?mc=021193
|