图自动布局算法 [英] Graph auto-layout algorithm

查看:30
本文介绍了图自动布局算法的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

为了简化问题,我有一个图,其中包含位于 2D 平面上的节点和边.

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

我想要做的是点击一个按钮,它使图形自动布局看起来干净.我的意思是最小的边交叉,节点之间的良好空间,甚至可以代表图形比例(加权边).

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?

谢谢.

推荐答案

我建议你看看 图形可视化.dot 程序可以采用图形的规范并为您生成网络图像,有点干净".如果您对理论背景感兴趣,我已经链接到理论"页面,该页面为您提供了一些可能相关的链接.如果您只是想要解决您面临的布局问题,那么库和工具本身已经足够成熟.

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". I've linked to the "theory" page that gives you some links that might be relevant if you're interested in the theoretical background. The library and tools themselves are mature enough if you simply want a solution to a problem with layout that you're facing.

这篇关于图自动布局算法的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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