After having to implement my own #python mini #graph system inside another graph system for a particular THING, I've been looking at how to space axis tick values so they a) use "nice" numbers and aren't too dense
There's a few research papers out there, but they have iterated optimizations, etc. I want something simple and fast just to keep my tucks from running into each other or being uselessly far away
This #stackoverflow post made no sense to me (esp due to the awful variable names in the top reply). But after messing with the ideas a bit, I think I get it.
https://stackoverflow.com/questions/361681/algorithm-for-nice-grid-line-intervals-on-a-graph#361687
Basically, see how big your data range is in orders of magnitude. Then see how "full" the "last order" is. If the last order is very full, take big steps, medium medium, etc. The step sizes are chosen from nice numbers like 1, 2, 5 and 10.
But here's my question: What about angles?
I think Id want a two-tiered system. For angles < 30, the nice numbers are still 1,2,5,10. For larger angles, I think they are 1,5,15,30,45,60,90
I'll have to try it and see