> The attachment didn't make it past the mailing list processor.
It's ok, you got the point anyway.
On 10/02/2012 12:11 AM, Hans-Bernhard Bröker wrote:
> Yes, it is. Oh, and it's not the floor() function that's "drifting" here. To see
> what actually happens, I suggest you have a look at the output of
> set table
> plot [0:10] x - floor(x)
Very good suggestion indeed, thanks, this way things are obvious!
> And no, 'set samples 1000' didn't actually solve the problem. It just made it small
> enough so you no longer noticed it.
> The actual solution would have been more 'set samples 101'. To understand why.
Yes, odd vs. even number of samples, I got the point. But then it is not very clear
to me why the default number of samples is even, as the situation pointed out here
can occur rather frequently. Is there some particular reason ? I assume there is, as
you guys probably already ran into that issue, I'm just curious.
At first, if I need to compute some function values, I'd compute them at the
beginning and the end of the considered interval, and, say, one value in the middle.
If given more time, I'd compute two other values in the "middle of the middle" (1/4
and 3/4). And so on. So, the default instinctive number of samples would be odd. But
maybe there is a counterpart to this approach that I don't see ? Or is it really not
that important ?
>> I understand that the number of samples can be changed to set the plot
>> accuracy vs. computing time tradeoff, but I didn't expect that that
>> parameter could produce "wrong" results if incorrectly set.
> The thing to be learned here is that the result isn't actually wrong. It's just not
> what you expected.
Sure, this is why I quoted "wrong", I meant "apparently wrong". I'm confident enough
with Gnuplot to know that it is a very good piece of software when it comes to
Regards, and thanks again for your detailed answer.