Home > Archive > PERL Modules > July 2004 > GDGraph hbars problem
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
GDGraph hbars problem
|
|
| Bricklen 2004-06-25, 6:40 pm |
| Has anyone had any problems with GD::Graph 1.43 hbars graphs?
I have a graph that works fine as a bars graph, but then doesn't display
the bars when it is converted to an hbars graph. If I change the dataset
then it will work most times.
I still haven't found a correlation between what will make it work, and
what won't, although it _is_ consistent.
Happens on both perl 5.8 and 5.6
If you need any more details, I'll be happy to provide them.
Cheers,
Bricklen
| |
| Bricklen 2004-06-25, 6:40 pm |
| Bricklen wrote:
> Has anyone had any problems with GD::Graph 1.43 hbars graphs?
> I have a graph that works fine as a bars graph, but then doesn't display
> the bars when it is converted to an hbars graph. If I change the dataset
> then it will work most times.
> I still haven't found a correlation between what will make it work, and
> what won't, although it _is_ consistent.
>
> Happens on both perl 5.8 and 5.6
>
> If you need any more details, I'll be happy to provide them.
Just to add a bit of a sloppy solution to this question, it turns out
that this line:
$self->{graph}->filledRectangle($l, $t, $r, $b, $dsci) if defined $dsci;
in GDGraph 1.43, bars.pm (approx. line 200), will have the $t and $b
values reversed for the (occasional) smaller results sets.
Not all small sets, just some. I couldn't determine what was causing
this, because the different sets of data being passed in were all
relatively the same.
The only fix that I could come up with was to add a handler that just
reversed the order of those two variables ($t,$b) if the $b<$t,
eg.
$self->{graph}->filledRectangle($l, $b, $r, $t, $dsci) if defined $dsci;
If anyone could shed more light on this, that would be great.
Cheers,
Bricklen
| |
| Martien Verbruggen 2004-07-17, 3:55 am |
| On Thu, 24 Jun 2004 22:15:11 GMT,
Bricklen <bricklen-rem@yahoo.comz> wrote:
> Bricklen wrote:
[color=darkred]
> Just to add a bit of a sloppy solution to this question, it turns out
> that this line:
> $self->{graph}->filledRectangle($l, $t, $r, $b, $dsci) if defined $dsci;
> in GDGraph 1.43, bars.pm (approx. line 200), will have the $t and $b
> values reversed for the (occasional) smaller results sets.
> Not all small sets, just some. I couldn't determine what was causing
> this, because the different sets of data being passed in were all
> relatively the same.
> The only fix that I could come up with was to add a handler that just
> reversed the order of those two variables ($t,$b) if the $b<$t,
> eg.
> $self->{graph}->filledRectangle($l, $b, $r, $t, $dsci) if defined $dsci;
>
> If anyone could shed more light on this, that would be great.
I just returned from holidays, which is why I didn't respond earlier.
Could you send me a data set and program that does what you say it does:
i.e. plot fine for bars, but not for hbars? I will then have a look at
what this could be.
If you could also send me a set that is "relatively the same" but
doesn't show this problem, that'd be much appreciated.
Thanks,
Martien
PS. I won't have access to my regular email account until Monday, and I
have quite some work to catch up with, so don't expect a speedy reply.
--
|
Martien Verbruggen | I used to have a Heisenbergmobile. Every time
| I looked at the speedometer, I got lost.
|
|
|
|
|
|