Menu

#12 grid is not useful

open
nobody
None
5
2020-12-19
2020-12-19
No

This is something I'd half noticed a long time back but having looked again it's worse than I thought.

I wanted to add a grid on my graph, to help visualise things. No problem, I thought, as there's a gtkdatabox_grid widget. But one of my axes is logarithmic, and the grid gets completely messed up, bunched into one end. For a logarithmic axis, the grid MUST use powers of ten (or of 2 if it's a log2 axis) as its marker values. It absolutely must NOT use linear spaced values!
So I abandoned it. But the customer asked for a grid, particularly on the graphs that aren't logarithmic. OK, it should work for them, I thought.
No. Because the grid widget evenly spaces the specified number of lines across the width and height of the box. That's fine if the axes have clean and simple limits that nicely match the number of grid lines, but only by coincidence. If the axis range is quirky - like it goes 0 to 5.5 (and you don't want 11 grid lines) then the grid is placed at really unhelpful values. Again, the simplistic approach is wrong.
The RIGHT way to do grid lines is the same as the way gtkdatabox_ruler chooses its tick marks.

Discussion


Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.