If what you're looking for is just a reference line, it'd be pretty easy to hack in, I think. There may be a bug or two in this (though it works in a trivial test case), but I'd think something along these lines would work:
# assuming $graph has already been set up and plotted
my $y_value = 42; # desired y-value for reference line
my $y_coord = ( $graph->val_to_pixel(0,$y_value,0) )[1];
my $GD = $graph->{graph};
my $red = $GD->colorResolve(255,0,0);
$GD->line($graph->{left},$y_coord,$graph->{right},$y_coord,$red);
Not that I've been thinking about precisely that problem, recently, or anything like that. ;-)
If God had meant us to fly, he would *never* have given us the railroads.
--Michael Flanders
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.