I'm intrested in the best way to draw a graph: i have a network and i'd like to draw a map of it. I know how to use gd, but i don't know how to make this graph good for viewing: i mean no line crossing etc. So, i guess there must be some tools or even php classes for doing this (maybe for graphviz dot?). Any help will be great for me!Answer1:
Well, maybe you could use the <a href="http://pear.php.net/manual/en/package.images.image-graphviz.about.php" rel="nofollow">PEAR Image_GraphViz</a> class?Answer2:
Personally, I'd off-load the work of drawing the graph to the browser.
If you do it this way, all your PHP code has to supply is the graph data.
Hope that helps.Answer3:
As you've laready hinted at, the quickest and simplest approach is to use graphviz. Given the abstraction provided by the dot language, there's little point in providing a PHP abstraction layer on top of it.Answer4:
Use google! <a href="http://code.google.com/apis/visualization/documentation/using_overview.html#load_your_libraries" rel="nofollow">http://code.google.com/apis/visualization/documentation/using_overview.html#load_your_libraries</a>
They have great graphs. You just need to present the information in the right matter for google to understand. It's pretty simple.