用正交线绘制层次树(HV-Drawing – Binary Tree) [英] drawing hierarchical tree with orthogonal lines ( HV-Drawing – Binary Tree)

查看:190
本文介绍了用正交线绘制层次树(HV-Drawing – Binary Tree)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要绘制层次结构树(HV-Drawing – Binary Tree),并在根和子级之间使用正交线(直的矩形连接线)(如下所示: http://lab.kapit.fr/display/visualizationlayouts/Hierarchical+Tree+布局 ). 我想知道是否有像这样绘制树的算法的开放源代码示例,以便我可以在动作脚本中实现相同的算法. 谢谢 声音

I need to work on drawing a hierarchical tree structure (HV-Drawing – Binary Tree) with orthogonal lines(straight rectangular connecting lines) between root and children ( like the following: http://lab.kapit.fr/display/visualizationlayouts/Hierarchical+Tree+layout ). I want to know if there are any open source examples of the algorithm of drawing trees like that so that I can implement the same algorithm in actionscript. Thanks Palash

推荐答案

这是我的 Python 3 实现: GitLab (这是内部项目,需要GitLab注册).

Here is my Python 3 realization: GitLab (this is internal project, GitLab registration required).

该程序仅包含一个文件,因此安装非常简单(克隆存储库并使用必要的参数运行hv-drawing.py). 此外,存储库还包含一些用于绘制图形的示例.

The program consists of only one file, so the installation is very simple (clone the repository and run hv-drawing.py with necessary arguments). Also the repository contents some examples of graphs for drawing.

该代码经过了很好的注释,因此您可以学习该算法的实现.

The code is well-commented, so you can learn the algorithm on its realization.

这篇关于用正交线绘制层次树(HV-Drawing – Binary Tree)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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