From: pmichaud Date: Tue, 21 Apr 2009 09:43:21 +0000 (+0000) Subject: From: Patrick Michaud X-Git-Tag: v0.07~7 X-Git-Url: http://git.imager.perl.org/imager-graph.git/commitdiff_plain/b748d4ed3deb22ed24d96a773bfd302e998ac21b From: Patrick Michaud One more diff for you - I noticed that without a title, my y-tics were partly off screen. This addresses that, in an admittedly somewhat crude way: http://vegitron.eplt.washington.edu/tmp/y_tops.diff --- diff --git a/lib/Imager/Graph/Vertical.pm b/lib/Imager/Graph/Vertical.pm index 867d8fe..e987e25 100644 --- a/lib/Imager/Graph/Vertical.pm +++ b/lib/Imager/Graph/Vertical.pm @@ -824,6 +824,11 @@ sub _remove_tics_from_chart_box { $self->_remove_box($chart_box, \@y_tic_box); $self->_remove_box($chart_box, \@x_tic_box); + + # If there's no title, the y-tics will be part off-screen. Half of the x-tic height should be more than sufficient. + my @y_tic_tops = ($chart_box->[0], $chart_box->[1], $chart_box->[2], $chart_box->[1] + int($tic_height / 2)); + $self->_remove_box($chart_box, \@y_tic_tops); + } sub _get_y_tic_width{