作者热门文章
- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我在 graphviz 上运气非常好,并且几乎能够制作所有
我需要的图表。我试图复制这个:
http://en.wikipedia.org/wiki/File:ICS_Structure.PNG
尽我所能忠实。该图的底部都从上到下流动,我的工作正常。我无法做的是将前 3 个 child 放在正下方
“事件指挥官”。它们向左和向右分支。另外请注意边在前 8 个节点中是如何共享的。用点可以吗?我能应付一切
其他但不是那些顶级节点。有人可以给我一个解决这个问题的线索吗?
最佳答案
复制图形布局的两种有用技术是:
digraph g{
ranksep=0.2;
node[shape=box3d, width=2.3, height=0.6, fontname="Arial"];
n1[label="Incident Commander"];
n2[label="Public Information\nOfficer"];
n3[label="Liaison Officer"];
n4[label="Safety Officer"];
n5[label="Operations Section"];
n6[label="Planning Section"];
n7[label="Logistics Section"];
n8[label="Finance/Admin. Section"];
node[shape=none, width=0, height=0, label=""];
edge[dir=none];
n1 -> p1 -> p2 -> p3;
{rank=same; n2 -> p1 -> n3;}
{rank=same; n4 -> p2;}
{rank=same; p4 -> p5 -> p3 -> p6 -> p7;}
p4 -> n5;
p5 -> n6;
p6 -> n7;
p7 -> n8;
}
关于GraphViz 节点放置和 Rankdir,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7374108/
我在 graphviz 上运气非常好,并且几乎能够制作所有 我需要的图表。我试图复制这个: http://en.wikipedia.org/wiki/File:ICS_Structure.PNG 尽我
我试图用 python 生成一个长图,其中始终有一个节点指向下一个节点。这最终导致了节点的长蜗牛(rankdir LR)。但是我想在一定的宽度或数量或节点后打破它。如何实现? graph = gv.D
我是一名优秀的程序员,十分优秀!