Menu

#387 option to set number of tics

open
nobody
None
5
2016-05-15
2014-04-19
No

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.

Discussion

  • leoking

    leoking - 2014-04-20

    I second this. It would be very useful.

     
  • Elwood Downey

    Elwood Downey - 2016-05-15

    I would also like this, thanks.

     

Log in to post a comment.