I have noticed an strange behaviour of do for loops. Depending of the loop limits and increments of the iterator gnuplot behaves erratically.
This piece of code works ok:
do for [i=999:2000000:1000] {
print i
}
This one do nothing, it exit the loop without print any value of i:
do for [i=999:3000000:1000] {
print i
}
This one works ok until i=704999 and then exits the loop :
do for [i=999:5000000:1000] {
print i
}
This one works ok again:
do for [i=999:5000000:100] {
print i
}
I have reproduced this behaviour in a desktop with ubuntu 12.04 and gnuplot 4.6 patch level 4, and in a macbook with gnuplot 4.6 patch level 5 (installed through macports).
This bug has already been fixed in 5.0rc1 and the fix will be in 4.6.6 also.
See Bug #1358
Works fine also for large increments:
Last edit: Christoph Bersch 2014-06-18
Thanks, I tried but didn't find something similar.
:)