如何在PHP中绘制图形? [关闭]

I have a graph which is induced by an adjacency matrix in PHP (i.e. a two dimensional array). I want to be able to draw an image of this graph, with nodes being circles, and arrows denoting edges. I also want to decorate the nodes / edges with some labels if possible.

I couldn't find any package that does that in PHP. Plenty for Matlab and other math programs.

I prefer not to use GD, because drawing graphs requires quite many calculations for doing right (deciding on edge length, distance between nodes, etc.)

Any ideas?

I would use javascript to display it. Check out Highcharts for example. With that one you can preprocess data from a database and the charts are nice