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

hello,

i have a question about making graphs with perl and vectorizing them. i hade the same problem a year back but then i found out that my employer didn't care how i did it as long as it works. so what i did i wrote a module/parser for gnuplot and produced any-format image the boss requested.

but now for reasons i don't think is of any relevance to share here (boss told me to...) i need to somehow make it integral as a part of the primary application. (gnuplot has some legal issues about redistributing it under the same license as Perl) so my question is: is there a way to produce vector graph images. i know the GD::Graph can print png, jpeg images but i need also a ps, eps and emf formated ones. so please, be so kind and share your knowledge ...

thnx

  • Comment on GD::Graph vector image (*.ps *.emf *.eps)

Replies are listed 'Best First'.
Re: GD::Graph vector image (*.ps *.emf *.eps)
by BrowserUk (Patriarch) on May 07, 2010 at 16:06 UTC

    GD which underlies GD::Graph, doesn't support vector graphics--or any of those output formats you mention--at all.

    Whilst (I think) that those formats you've mentioned can incorporate bitmap images of the type GD produces, GD(::Graph) gives no support for producing those. You would need to seek out other solutions for creating those formats and including any images you created with GD::Graph into them. Relative to what gnuplot can do, this would involve lot of work on your behalf.

    You might get on better looking at SVG & SVG::Graph, but I think you might still have the problem of having to also produce the ps,eps, emf format docs yourself and incorporate the SVG output into them.

    That said. The licensing rules for gnuplot do not seem so onerous. Leave the copyright notice intact. If you modify it, change the version to reflect that, and include the patches you made along with the (binary) distribution. Why do you have to distribute it "under the same license as perl"?


    Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
    "Science is about questioning the status quo. Questioning authority".
    In the absence of evidence, opinion is indistinguishable from prejudice.