GraphViz 节点放置和 Rankdir
我在 graphviz 上非常幸运,并且几乎能够制作每一个 我需要的图表。我正在尝试复制此内容:
http://en.wikipedia.org/wiki/File :ICS_Structure.PNG
尽我所能。该图的底部部分全部从上到下流动,我的工作正常。我无法做的是将前 3 个孩子放在下面 “事件指挥官”。他们左右分支。另外请注意前 8 个节点中的边是如何共享的。用点可以吗?我能应付一切 否则,但不是那些顶部节点。有人可以给我解决这个问题的线索吗?
I'm having very good luck with graphviz and have been able to make nearly every
graph that I need. I'm trying to duplicate this:
http://en.wikipedia.org/wiki/File:ICS_Structure.PNG
as faithfully as I can. The bottom part of that graph all flows top to bottom and I've got that working fine. What I have not been able to do is place the first 3 children right below
"Incident Commander". They branch left and right. Plus note how the edges are shared in the top 8 nodes. Is that possible with dot? I can deal with everything
else but not those top nodes. Can someone give me a clue to solve this?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
复制图形布局的两种有用技术是:
这是对顶部节点的快速尝试:
这是结果:
Two useful techniques for reproducing graph layouts are:
Here's a quick try for the top nodes:
And here's the result:
本机 Graphviz(点)渲染不支持原始中使用的器官图渲染样式。虽然它可以生成正交边(如图所示),但无法自动对边进行分组。垂直分层可以通过
minlen
来实现。接受的答案有点滥用该符号,但总体上是一种合理的方法。自动化可能会很困难,推荐的所见即所得替代方案可能是最简单的。
对所提供解决方案的更改是:
The native Graphviz (dot) rendering does not support the organogram rendering style used in the original. While it can generate orthogonal edges (as shown), there is no way to automate the grouping of edges. The vertical layering can be achieved with
minlen
.The accepted answer is somewhat of an abuse of the notation, but altogether a reasonable approach. It will likely be difficult to automate and the recommended WYSIWIG alternative is likely to be simplest.
The changes to the supplied solution are: