revdiablo has asked for the wisdom of the Perl Monks concerning the following question:

I am searching for a way to create pretty, anti-aliased line graphs. I have looked around CPAN, but cannot seem to find anything. I might be overlooking something, though. Here's what I found, and why they didn't work for me:

So, in desparation, I turn to the Monks. Is there anything I'm overlooking? If all else fails, I will probably create Imager::Graph::Line. Before I do that, I'd like to see if anybody knows of anything else. So please, let me know of any possible leads. Also, let me know if there's any interest in Imager::Graph::Line, so I will know whether I should release it (in the case that I make it).

  • Comment on Anti-aliased line graphs [or is that charts?]

Replies are listed 'Best First'.
Re: Anti-aliased line graphs [or is that charts?]
by PodMaster (Abbot) on Dec 28, 2004 at 07:43 UTC
    From GD::Graph
    # TODO Deal with antialiasing here? if (0 && $self->can("setAntiAliased"))
    setAntiAliased is a GD method.

    MJD says "you can't just make shit up and expect the computer to know what you mean, retardo!"
    I run a Win32 PPM repository for perl 5.6.x and 5.8.x -- I take requests (README).
    ** The third rule of perl club is a statement of fact: pod is sexy.

      From GD::Graph

      Hmm, it's not in the POD anywhere... but I see you looked in the code. No fair. :-)

      This is disabled, though. Does that mean it doesn't work, or they just haven't tried it? If it works, I can't quite seem to figure out how. Reading the GD POD, it says setAntiAliased is used to set the color for anti-aliased lines, but it doesn't say how to enable antialiasing. And even if it did, that would require digging into GD::Graph's internals from outside, which seems ugly. Any other ideas?

Re: Anti-aliased line graphs [or is that charts?]
by Jaap (Curate) on Dec 28, 2004 at 12:16 UTC
    You could use SVG to output your graph. Most SVG viewers like Adobe's have very nice AA. Also look at SVGGraph for inspiration.
Re: Anti-aliased line graphs [or is that charts?]
by superfrink (Curate) on Dec 28, 2004 at 05:58 UTC
    (Warning: I don't know what I'm talking about.)

    I'm not a graphics expert but isn't anti-aliasing kind of like bluring around the high contrast areas? If so maybe Image::Filter::Blur or one of the other Image::Filter modules might help.
Re: Anti-aliased line graphs [or is that charts?]
by fortezza (Sexton) on Dec 29, 2004 at 04:20 UTC
    ChartDirector will do what you're looking for, however it is not free.