The autoTimeAxis function has changed significantly, to ensure that
the full day-month-year hour-minute-second information is displayed
(to an appropriate level of granularity), using two rows of labels
instead of one. I added a lot of new tests into all_tests.hs (test2a-
w) to show the effect, as the extent of the plot gradually reduces
from several years down to a few seconds. I hope it is clear from
those, how I tried to ensure that labels never interfere with one
another, at least at the default plot size of 640x480.
Regards,
Malcolm
> I attach some new patches, (1) to fix up errors in the tests,
> introduced by the change in the type of renderableToPNGFile, and (2)
> to introduce a second row of labels on a time series axis, as
> discussed previously on this list.
>
> The autoTimeAxis function has changed significantly, to ensure that
> the full day-month-year hour-minute-second information is displayed
> (to an appropriate level of granularity), using two rows of labels
> instead of one. I added a lot of new tests into all_tests.hs
> (test2a-w) to show the effect, as the extent of the plot gradually
> reduces from several years down to a few seconds. I hope it is clear
> from those, how I tried to ensure that labels never interfere with one
> another, at least at the default plot size of 640x480.
Thanks for these patches. I have pushed them.
A couple of things came to mind when looking at these:
- I considered whether it might be better to generalise from your two
"levels" of labels to an arbitrary number. ie instead of:
axis_labels_ :: [ (x, String) ],
axis_context_ :: [ (x, String) ],
have:
axis_labels_ :: [[ (x, String) ]],
In practice, however, I guess that more than two levels would be unusual.
- My original time axes were written with dates in mind. I thought it
was sensible that labels like "2008-05-01", or "June 2010", or "2010"
appeared aligned with the center of the associated interval on the axis.
However, I wonder if times like "3pm" or "16:35" etc should be aligned
with the point in time rather than the interval?
Cheers,
Tim
Yes, I know what you mean. In practice, it is not too bad having, say
16:35, centred between two ticks, because that range is indeed all
part of the same minute - if there are minor ticks at seconds, they
are :00 :01 :02 :03 etc, all within the same contextual label.
However, where it does certainly start to grate, is when there are 5-
minute or 5-second labels, and they span the whole 5-tick range. I
will look into ways of signalling whether a set of time labels should
be centred or tick-aligned.
Regards,
Malcolm