|Subject:||'y_min_ticks' and 'y_max_ticks' aren't honored when 'integer_ticks_only' is set|
Hi, in Chart 2.4.1, when 'integer_ticks_only' is set, the settings for 'min_y_ticks' and 'max_y_ticks' don't take any effect. This can be seen eg. with the following script: -------- #! /usr/bin/perl -w use Chart::LinesPoints; @data=([2000..2200], [0..200]); $obj=Chart::LinesPoints->new (600,400); $obj->set ('max_y_ticks' => 6); $obj->set ('min_y_ticks' => 2); $obj->set ('integer_ticks_only' => 1); $obj->png ("foo.png",\@data); -------- You get 200 Y ticks (which are unreadable) disregarding the max_y_ticks of 6. If you remove integer_ticks_only, you get just 3 ticks. I'm attaching a patch that fixes this. In the case of max_y_ticks, if the result would go over that, the tick interval is increased. This will override 'skip_int_ticks', if needed. In the case of min_y_ticks, if the result is below that, first the tick interval is decreased (overriding 'skip_int_ticks', if needed). If that doesn't help, the range of the scale is increased by either increasing the maximum value or decreasing the minimum value. If both are fixed, there's nothing to be done. Please consider including the patch in a future release. For reference, this was originally reported by Bill Allombert as Debian bug #359943,. I have investigated this with Perl 5.8.8 on Debian GNU/Linux. Cheers, -- Niko Tyni (on behalf of the Debian Perl Group) email@example.com
Message body not shown because it is not plain text.