NAME
GD::Graph::Polar - Make polar graph using GD package
SYNOPSIS
use GD::Graph::Polar;
my $obj=GD::Graph::Polar->new(size=>480, radius=>100);
$obj->addPoint (50=>25);
$obj->addPoint_rad (50=>3.1415);
$obj->addGeoPoint (75=>25);
$obj->addGeoPoint_rad (75=>3.1415);
#$obj->addLine($r0=>$t0, $r1=>$t1, $r2=>$t2, ...); #TODO
print $obj->draw;
DESCRIPTION
CONSTRUCTOR
new
The new() constructor.
my $obj = GD::Graph::Polar->new( #default values
size=>480, #width and height in pixels
radius=>1, #scale of the radius
ticks=>10, #number of major ticks
border=>2, #pixel border around graph
);
METHODS
addPoint
Method to add a point to the graph.
$obj->addPoint(50=>25);
addPoint_rad
Method to add a point to the graph.
$obj->addPoint_rad(50=>3.1415);
addGeoPoint
Method to add a point to the graph.
$obj->addGeoPoint(75=>25);
addGeoPoint_rad
Method to add a point to the graph.
$obj->addGeoPoint_rad(75=>3.1415);
addLine
Method to add a line to the graph.
$obj->addLine(50=>25, 75=>35);
addLine_rad
Method to add a line to the graph.
$obj->addLine_rad(50=>3.14, 75=>3.45);
draw
Method returns a PNG binary blob.
my $png_binary=$obj->draw;
TODO
BUGS
Please send to the geo-perl email list.
LIMITS
addLine method is linear with respect to the XY space. It is not linear with respace to radius-theta space.
AUTHOR
Michael R. Davis qw/perl michaelrdavis com/
LICENSE
Copyright (c) 2006 Michael R. Davis (mrdvt92)
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
SEE ALSO
GD Geo::Constants Geo::Functions