Bug#359943: libchart-perl: integer_ticks_only doesn't honor max_y_ticks

Niko Tyni ntyni at iki.fi
Wed Apr 19 11:30:07 UTC 2006


On Tue, Apr 18, 2006 at 09:58:20PM +0200, Bill Allombert wrote:
 
> There are some ticks above the graph now:

Oh dear. See below.

> > The default for max_y_ticks is the same in both cases, 100. The
> > 'integer_ticks_only' code aims for a tick interval of 1, but if that goes
> > over max_y_ticks, it starts compensating. Without 'integer_ticks_only',
> > the 'max_y_ticks' kicks in only with non-integer tick intervals.
> 
> Ah, so this is the intended behaviour ? Weird.

The original upstream behaviour with 'integer_ticks_only' is to always
use a tick interval of 1 (or whatever is in 'skip_int_ticks'), and not
to care about eg. 'max_y_ticks' at all. This is handled with separate
logic from the non-integer case.  I have been patching this separate
logic to take 'max_y_ticks' etc. into account.

But you're right, this is not the optimal solution. The attached patch
is a new approach: it uses the same code in both integer and non-integer
cases. The biggest special case left is now when a fixed tick interval
is explicitly given via 'skip_int_ticks'.

I think this is more robust than the previous solutions. I have tried to
test it more carefully this time, as my track record on buggy patches on
this issue is getting embarrassing. Sorry about that, and thanks for your
patience. I would appreciate once again if you could test this one too.

Cheers,
-- 
Niko Tyni	ntyni at iki.fi
-------------- next part --------------
A non-text attachment was scrubbed...
Name: chart-ticks.debian.patch.4
Type: application/x-patch
Size: 7474 bytes
Desc: not available
Url : http://lists.alioth.debian.org/pipermail/pkg-perl-maintainers/attachments/20060419/7751f17a/chart-ticks.debian.patch.bin


More information about the pkg-perl-maintainers mailing list