Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Graph Generation

by rpike (Scribe)
on Dec 07, 2010 at 15:14 UTC ( #875818=perlquestion: print w/ replies, xml ) Need Help??
rpike has asked for the wisdom of the Perl Monks concerning the following question:

Looking for a free library in Perl that I can use to generate graphs on the fly. Any recommendations would be appreciated. Thanks. In addition: this app may not get installed on a computer that has access to the web so I'm not sure how well google apps will be for cases like that. Is there a good library or such for dynamically generating geometric shapes?

Comment on Graph Generation
Re: Graph Generation
by kennethk (Monsignor) on Dec 07, 2010 at 15:23 UTC
Re: Graph Generation
by chrestomanci (Priest) on Dec 07, 2010 at 15:26 UTC

    What about GD::Graph and related modules in that namespace.

    A number of years ago I was using GD::Graph to emit daily reports from overnight regression tests. I was writing the graphs to the filesystem which where then served up as static files by Apache, however if you prefer you can generate your graph within a CGI script an serve it up directly in response to a CGI query.

    I believe that it is possible to get GD::Graph to emit graphs in SVG form (instead of bitmap), by passing it a GD::SVG render surface, though I have never tried that.

    Back in the day, I submitted a patch related to how graph axes where generated and where the tick marks would appear.

Re: Graph Generation
by rpike (Scribe) on Dec 07, 2010 at 15:59 UTC
    I should have put what I'm trying to accomplish as well. I'm trying to feed into a URL the data and the generating application so as to dynamically generate graphs in a CGI app. So, for example : somescript.pl?xdata=1,2,3,4&ydata=10,20,30,40. I'm trying to generate as 'pretty' as possible graphs for display. That's essentially what I'm looking for. Also, along with your recommendations, can you refer me to as thorough link to documentation? Quick visual aids would be benefical so I can scan through quickly and see generated graphs that match my needs. Thanks again.
      l. I'm trying to feed into a URL the data and the generating application so as to dynamically generate graphs in a CGI app. So, for example : somescript.pl?xdata=1,2,3,4&ydata=10,20,30,40

      Sounds like you're about to re-invent the google chart API.

      I'm trying to generate as 'pretty' as possible graphs for display.

      No GD::Graph then. You could take a look at Chart::Clicker.

      Quick visual aids would be benefical so I can scan through quickly and see generated graphs that match my needs.

      I'm sure Google or your search engine of choice will help you finding examples.

        Any suggestions for generating geometric shapes? Also is there a way I can make a mock x-y graph whereby the values for the x and y go through the middle of the graph (i.e. negative values for y axis are to left of the labelled line and the negative values for the x-axis are below the x-axis labelled line). Thanks again.
Re: Graph Generation
by Khariton (Sexton) on Dec 07, 2010 at 20:32 UTC
    For creating graphs I use graphviz command-line executables now. This is good documentated package(www.graphviz.org).
    Also You can find perl module on cpan too:
    http://search.cpan.org/search%3fmodule=GraphViz

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://875818]
Approved by Corion
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others perusing the Monastery: (3)
As of 2014-07-26 13:14 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (176 votes), past polls