Subject: | frames, spaces and cut offs |
Date: | Thu, 01 Mar 2012 12:22:42 +0100 |
To: | bug-Chart-Clicker [...] rt.cpan.org |
From: | Thomas Wolf <thomas.wolf [...] uni-jena.de> |
Hi,
I am using Perl 5.14.2 on Ubuntu 10.04 64 bit and Chart::Clicker 2.79.
The problems were also present in Perl 5.10.1 and Chart::Clicker 2.76.
It looks like some of the x- and y-axis ticks and die series labels
(legend) are cut at the end.
There is nearly no space between x-axis ticks and the x-axis label. And
only little space between the x-axis label and the legend.
The series labels (legend) look like not beeing at the same level. For
me, it looks like the label of the second series starts 1 or 2 pixels
above the label of the first series, the third above the second and so
on. Or is this an optical illusion? Without that "p" (or q or y or ...)
it seems to be ok.
With version 2.79 (or 2.78 or 2.77 - I do not know) Chart::Clicker
introduced a frame (border width greater than 0) around the x-axis and
y-axis labels. How can one set the border width back to 0?
Unfortunately, this frame increased the unpleasant density around the
x-axis label, ticks and the legend.
###
use Chart::Clicker;
my $chart = Chart::Clicker->new( format => "pdf", width => 4000, height
=> 500 );
$chart->legend->font->size(40);
my $xContext = $chart->get_context("default")->domain_axis;
$xContext->label_font->size(45);
$xContext->tick_font->size(40);
$xContext->label("very little space at the top and at the bottom");
my $yContext = $chart->get_context("default")->range_axis;
$yContext->label_font->size(45);
$yContext->tick_font->size(40);
$yContext->label("sufficient_space");
my $series1 = Chart::Clicker::Data::Series->new(keys=>[1, 2, 3],
values=>[1, 2, 3]);
$series1->name("5 p Series Label Name");
my $series2 = Chart::Clicker::Data::Series->new(keys=>[4, 5, 6],
values=>[1, 2, 3]);
$series2->name("10 p Series Label Name");
my $series3 = Chart::Clicker::Data::Series->new(keys=>[7, 8, 9],
values=>[1, 2, 3]);
$series3->name("15 p Series Label Name");
my $series4 = Chart::Clicker::Data::Series->new(keys=>[10, 11, 12],
values=>[1, 2, 3]);
$series4->name("20 p Series Label Name");
my $dataset = Chart::Clicker::Data::DataSet->new(series=>[$series1,
$series2, $series3, $series4]);
$chart->add_to_datasets($dataset);
$chart->write_output("labels.pdf");
###
Same behavior with smaller font sizes. Maybe the ticks and labels cut
off increases with the width of the chart.
Regards,
Thomas
Message body not shown because it is not plain text.