Carl Worth [Tue, 27 Jan 2009 16:12:39 +0000 (08:12 -0800)]
Add minor ticks
For now, do 5 divisions of each major tick, regardless of whether the
major tick spacing is 1, 2.5, 5, or 10. Also, we don't yet fix the
axes to guarantee integer spacing of the minor ticks.
Carl Worth [Tue, 27 Jan 2009 15:34:23 +0000 (07:34 -0800)]
Remove code duplication for X and Y ticks
I knew this code was repeated, and fortunately it wasn't as hard to
share it as I thought it might be. Adding minor-tick rendering will
be much easier now that this is shared.
Carl Worth [Tue, 27 Jan 2009 07:17:42 +0000 (23:17 -0800)]
Finish adjustment of tick positions for pixel-snapping.
This is the final step of adjusting the axis ranges so that
the ticks aligne nicely with integer pixel boundaries. Notably
we don't round the ticks at all while drawing them---instead
we only adjust the axis ranges so that when we draw the ticks
at their numerical positions they will look good.
Carl Worth [Sun, 25 Jan 2009 17:30:50 +0000 (04:30 +1100)]
Cleverly adjust axis ranges for integer tick spacing.
This will help avoid one of my major pet peeves with chartting
packages, which is non-pixel-aligned ticks. This is part of
the problem solved, (integer spacing between ticks), but we
still need integer alignment.
Carl Worth [Sun, 25 Jan 2009 16:46:16 +0000 (03:46 +1100)]
Remove bogus 0.5 offset when setting up data transform.
I think my intuition here had been to provide at least some padding
between the frame and data. But we should do that explicitly (and
correctly) rather than just throwing in a 0.5 offset.
Carl Worth [Sun, 25 Jan 2009 07:18:49 +0000 (18:18 +1100)]
Add preliminary implementation of acre
This is a simple chart-drawing library using cairo. We will use
this to replace the image-magick and perl-using csv2png script,
(and then also use this to do interactive charts within a GUI).