I recently saw cases where the %g format was cauing a value that
should be 0.0 on the axis to appear as something insane like 5.58e-17.
If the value is within a thousandth of a sub-step, (a sub-step is the
space between two minor ticks on the axis), of 0.0 then force it to be
truly 0.0.
{
PangoLayout *layout;
int width, height;
+ double label_value;
cairo_save (cr);
- layout = _create_layout_printf (acre, "%g", t);
+ label_value = t;
+ if (fabs (label_value) < (sub_step / 1000.))
+ label_value = 0.0;
+ layout = _create_layout_printf (acre, "%g", label_value);
if (ticks == ACRE_TICKS_X)
cairo_move_to (cr, t, acre->y_axis.view_min);