can someone please tell me how to install GD on activeperl for windows. i've installed it with the ppm and i've tried multiple examples of code and can't get anywhere. when in the ppm i've done a query to see if the gd is installed and it is indeed there.
this is one of the pieces of code i've tried to use with no sucess!
use Chart::Plot;
my $img = Chart::Plot->new;
my @data = qw( 10 11 11 12 12 13 13 14 14 15);
$img->setData (\@data);
# draw circles around each data point, diameter 15 pixels
my $gd = $img->getGDobject;
my $blue = $gd->colorAllocate(0,0,255); # or use $img's blue
my ($px,$py);
for (my $i=0; $i<$#data; $i+=2) {
($px,$py) = $img->data2pxl ($data[$i], $data[$i+1]);
$gd->arc($px,$py,15,15,0,360,$blue);
}
# draw the rest of the chart, and print it
open (OUT,">plot.gif");
binmode OUT;
print OUT $img->draw();
close OUT;
Edit kudra,
2001-06-29
Added code tags
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.