When all the values are integers, skip fractional ticks?

the axis should show 1, 2, instead of 1.0, 1.5, 2.0
Auto-detecting when this situation happens is more difficult than it seems at first glance.
And it could be argued it's a type of scale (type="integer"), rather than a type of ticks. The difference would show in an example where, say, data covers the years 2019, 2020 and 2021. The color legend would become ordinal rather than continuous. 🤔
Feels related to ordinal intervals #513?
#1790 handles some of these cases. I think the remaining case is covered by #1013 (which is generalizable beyond integers, such as time intervals). Maybe we can close this issue now?