可视化 DAG

发布于 2024-09-15 15:07:15 字数 136 浏览 10 评论 0原文

我有一个大型有向无环图,我想在位图图像中可视化。

理想情况下,我希望所有根节点都位于图像的顶部,所有叶节点都位于底部,即图形边缘都指向向下的方向。

是否有一个好的算法来计算出满足这些约束的所有节点的坐标并产生良好的可视化效果?

I have a large directed acyclic graph that I would like to visualize in a bitmap image.

Ideally I'd like to have all the root nodes at the top of the image, and all of the leaf nodes at the bottom, i.e. the graph edges are all pointing in a downwards direction.

Is there a good algorithm for working out the coordinates of all the nodes that meets these constraints and will produce a good visualization?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(6

嘿嘿嘿 2024-09-22 15:07:15

我建议您使用 Gephi

这个软件可以做你想做的所有事情,特别是图形布局!

I advise you to use Gephi.

This soft is able to do all the things you want to, especially graph layouts !

誰ツ都不明白 2024-09-22 15:07:15

查看 Graphviz 软件集合。它包含几个用于渲染图形的程序。

最简单的方法是以 Graphviz 的文本格式之一将图形写入磁盘。然后执行渲染程序之一,并将生成的图像加载到您的应用程序中。

Look at the Graphviz software collection. It contains several programs to render graphs.

The most simple way is to write your graph to disk, in one of Graphviz's text formats. Then execute one of the render programs, and load the resulting image into your application.

淡水深流 2024-09-22 15:07:15

贝叶斯网络有类似的要求。您可能会寻找贝叶斯网络的算法。例如,本文可能会有所帮助。

Bayesian Networks have similar requirements. You might look for algorithms for Bayesian Networks. This paper for example might be helpful.

明月夜 2024-09-22 15:07:15

如果图形相当简单,那么位图将非常适合您。然而,对于非常密集的图形,您需要带有矢量图形的文件,例如 SVG 文件,它将支持以更友好的方式放大和缩小精细细节。更好的是使用专门用于导航图形的交互式工具,例如上面提到的 gephi 或 yED

如果您想可视化软件依赖关系图,我发现的最佳导航工具是 DGML 工具是 Visual Studio 的一部分。他们使用非常强大的 Sugiyama 树形布局在使图形的流动具有方向性方面做得很好。它们具有强大的交互功能,这些边缘跳跃链接是无与伦比的。您还可以组织子图并将其折叠起来等。

维基百科中涵盖了几种图形描述语言,请查看
https://en.wikipedia.org/wiki/Category:Graph_description_languages。如果您有足够大的 RAM,DGML 工具可以非常愉快地渲染,并使图形的交互和探索变得非常直观。

这里有关于布局技术的不错的概述< /a> 特别是来自 Kozo Sugiyama 的#2 分层图形绘制

If the graph is fairly simply then bitmaps will serve you fairly well. For very dense graphs however you'll want something with vector graphics, such as a SVG file that will support zooming in and out of fine details in a more friendly manner. Better yet is to use an interactive tool dedicated to navigating a graph such as gephi like someone mentioned above or yED

If you're trying to visualize a software dependency graph the best tool I've found for navigating is the DGML tools that are part of Visual Studio. They use a very powerful Sugiyama tree layout that does a fine job of making the flow of the graph directional. They have powerful interactive features with these edge hopping links that are bar none. You can also organize subgraphs and collapse them down, etc.

There's several graph description languages covered in Wikipedia with checking out
https://en.wikipedia.org/wiki/Category:Graph_description_languages. If you have a good chunk of RAM the DGML tools can render very pleasantly and make the interaction and exploration of the graph very intuitive.

There's a decent overview of layout techniques to be seen here particularly #2 Layered Graph Drawing from Kozo Sugiyama.

风吹雪碎 2024-09-22 15:07:15

您可能对分层图形绘制(也称为“分层图形绘制”或“杉山式图形绘制”)感兴趣。该算法太长,无法在这里描述,但谷歌搜索提供了许多可靠的解释。

You might be interested in layered graph drawing (also known as "hierarchical graph drawing" or "Sugiyama-style graph drawing"). The algorithm is too long to describe here, but Google searches bring up many reliable explanations.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文