Exactly, minimum tic increment.
I have now sent feature request to the developers.
After doing quite a lot testing with this I still could not get to work.
Good side is that I learned heck of a lot :)
This was as close I could get:
# dummy plotting to set GPVAL-variables
plot "< tail -7 bugs.data" using 2 with lines
# some of these values will be RESET if set before dummy plotting!
unset xtics
set key off
set term png
set output 'bugs-week.png'
set xlabel "dayz: 7 (" . system("date +'%d-%b-%Y %H:%M'") . ")"
# works just as wanted, except if all data is zeros, then ERROR!
maxy=(GPVAL_DATA_Y_MAX - GPVAL_DATA_Y_MIN < 11 ? 10 : GPVAL_DATA_Y_MAX)
set yrange [GPVAL_DATA_Y_MIN:maxy<*]
refresh
As I put in the comments, some weird behavior was found.
Some of the settings were reset and had to be set again after plotting, atleast set output 'filename', so I do the dummy plot first and then set all things.
Another weird thing, and one that prevents me to use this solution, is yrange autoscale.
If data contains only zeros, autoscale fails:
"plotdata.txt", line 14: y_min should not equal y_max!
It fails although I set "minium of maxy and autoscale" where maxy is atleast 10.
This fail happens only with "refresh".
If I do same yrange setting before "normal" plotting, it works as should.
Sounds like a bug to me...
If I leave autoscaling out "set yrange [GPVAL_DATA_Y_MIN:maxy]" it works, but outcome is not as nice as the top value is missing from Y-axis.
Pity, since otherwise I finally got it exactly as I wanted:
integer stepping and never below 0 (no split nor negative bugs).
Thanks for the examples and help!