图表自动布局算法图表、算法、布局

2023-09-10 22:52:29 作者:不愛ωǒ麽、容嬷嬷拿針來

为了简化问题,我有一个包含节点和边缘,即在2D平面上。

To simplify the problem, I have a graph that contains nodes and edges which are on a 2D plane.

我希望能够做的就是点击一个按钮,它使自动布局的图形看起来很干净。我的意思是边缘的最小路口,节点间不错的空间,甚至重新present的图形比例(加权边缘)。

What I want to be able to do is click a button and it make the automatically layout the graph to look clean. By that I mean minimal crossing of edges, nice space between nodes, maybe even represent the graph scale (weighted edges).

我知道这完全是主观的,什么是干净美观的图表,但没有人知道的一种算法入手,而不是重新发明轮子?

I know this is completely subjective of what is a clean looking graph, but does anyone know of an algorithm to start with, rather than reinventing the wheel?

感谢。

推荐答案

我会建议你看一看在 graphviz的。该程序可以利用图表的规范,并生成网络的图像为你有点干净。该网页上的理论的链接给你一些链接,如果您有兴趣的理论背景,可能是相关的。

I would suggest that you take a look at at graphviz. The dot program can take a specification of a graph and generate an image of the network for you somewhat "cleanly". The "theory" link on that page gives you some links that might be relevant if you're interested in the theoretical background.