NAME

GD::Graph - Frequently asked questions

DESCRIPTION

I am drawing a bar chart, and the chart area is a lot smaller than the image. What is going on?

As of version 1.30, GD::Graph automatically corrects the width of the plotting area of a chart if it needs to draw bars (i.e. for bars and some mixed charts). This is necessary, because rounding errors cause irregular gaps between or overlaps of bars if the bar is not an exact integer number of pixels wide.

If you want the old behaviour back, set the correct_with attribute to a false value.

I have my data in some format that doesn't look at all like the array that I am supposed to give to GD::Graph's plot method.

Check out the GD::Graph::Data class.

Where is the ActiveState ppm of GD::Graph?

Ask them. I have asked them, but didn't get an answer. I don't know what to do to get it included in their set of ppms, and I really do not have the time to keep asking them.

Do you have some example code for me?

The distribution has a large set of examples in it. If you don't have the original distribution, please get it from CPAN (http://www.cpan.org/ or some local mirror).

Will you support X or Y?

If you send me a patch that (in a decent manner) adds the functionality to the latest version, I may very well add it for the next release. If you don't send me a patch, but just a question, you will have to be patient.

Why does export_format give me a weird string, instead of just 'png' or 'gif'?

As of version 1.31, export_format in a list context returns all formats that GD can export. If you are only interested in the answer 'gif' or 'png', make sure that you call it in a scalar context.

$export_format = GD::Graph->export_format;
$export_format = $graph->export_format;
print "Export format is ", scalar $graph->export_format, "\n";
print "Export format is " .  $graph->export_format . "\n";
@export_formats = $graph->export_format;

AUTHOR

Martien Verbruggen <mgjv@tradingpost.com.au>

Copyright (c) 2000 Martien Verbruggen.

All rights reserved. This package is free software; you can redistribute it and/or modify it under the same terms as Perl itself.