It would be very useful to have an option to the tics
commands to explicitly set the number of tics on an axis, something like:
set xtics ntics 2
which would set one tic each at the upper and lower bounds of the axis.
The way I currently do this is to use stats
and set xtics (stats_x_max-stats_x_min)/(ntics-1)
and occasionally I try to do some arithmetic to make the intervals be at nice round numbers. There could perhaps be an optional keyword (e.g. {smart|dumb}
) to either set the interval to be nice and round or simply the range divided by (ntics-1)
.
gnuplot already has some internal logic to decide the axis ranges and where to place tics, so this option would place an additional constraint (ntics) on the tic locations.
This would be exclusive with the option to set the tic interval.
I second this. It would be very useful.
I would also like this, thanks.