如何在PHP中进行有向图绘制? [英] How to do directed graph drawing in PHP?

查看:160
本文介绍了如何在PHP中进行有向图绘制?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在寻找一种在PHP中绘制有向图的方法。 (如 http://upload.wikimedia.org/wikipedia/commons/ 0/08 / Directed_acyclic_graph.png )。我希望它能创建一个图像,就像GD可以输出图像一样。



我在这方面搜索了很多,但我只能找到很多图书馆通常绘制图表(带有酒吧等),而不是有向图。



PS我试过使用dot(linux程序)通过system(),但不幸的是,我没有权限在服务器上这样做。另外,我没有权限在服务器上安装PHP扩展和类似的东西,所以它应该能够与普通的PHP一起工作(理想情况下只需包含一个文件)。我发现一个 rel =nofollow noreferrer>与GraphViz的PEAR接口;我之前没有使用它,所以不能给你任何个人建议,不管它是好还是坏。 (但也许这并不能解决你的问题,因为你说你不能安装应用程序)


I'm looking for a way to draw directed graphs in PHP. (as in http://upload.wikimedia.org/wikipedia/commons/0/08/Directed_acyclic_graph.png). I want it to create an image of the graph just like GD can output an image.

I've googled a lot on this, but I only can find a lot of libraries for drawing graphs in general (with bars etc), not directed graphs.

P.S. I've tried using dot (the linux program) via system(), but unfortunately I have no permission to do that on the server. Also, I have no rights to install PHP extensions and stuff like that on the server, so it should work with normal PHP (ideally just by including a file).

Thanks in advance.

解决方案

I found a PEAR interface to GraphViz; I have not used it before so can't give you any personal recommendation whether it's good or bad. (but perhaps that doesn't solve your problem since you say you can't install applications)

这篇关于如何在PHP中进行有向图绘制?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆