width - Graphviz:垂直对齐子图
问题描述
我有四个子图,我想(a)具有相同的宽度并且(b)垂直对齐(红色>黄色>绿色>紫色)。我不知道该怎么做。这是dot
代码,为清楚起见进行了简化:
digraph {
rankdir = "TB";
compound=true;
node [shape=box, style=filled,color=white];
subgraph cluster_pre_proto_greek {
label="Pre-Proto-Greek";
style=filled;
color=red;
c1 [label = "1. Change of word-final *ms to *ns"];
c2 [label = "2. Loss of word-final *i̯ after a long vowel"];
c3 [label = "3. Change of dental stop to *s before dental stop"];
}
subgraph cluster_pre_proto_attic_ionic {
label="Pre-Proto-Attic-Ionic";
style=filled;
color=yellow;
c4 [label = "4. Merger of *K̑ with *K"];
c5 [label = "5. Merger of *Ku̯ and *Kʷ"];
c6 [label = "6. Loss of laryngeals"];
}
subgraph cluster_pre_homeric {
label="Pre-Homeric";
style=filled;
color=green;
c7 [label = "7. Early vowel contractions and rise of tones"];
c8 [label = "8. Metathesis of *TK to *KT"];
c9 [label = "9. Vowel epenthesis before word-initial *r"];
}
subgraph cluster_homeric {
label="Homeric";
style=filled;
color=purple;
c10 [label = "10. Devoicing of voiced aspirates"];
c11 [label = "11. Vocalisation of syllabic sonorants before vowel or *i̯"];
c12 [label = "12. Vocalisation of syllabic nasals"];
}
c1 -> c12;
c3 -> c6;
c3 -> c9;
c4 -> c5;
c5 -> c11;
c6 -> c7;
c6 -> c11;
c6 -> c12;
c7 -> c8;
c9 -> c10;
c10 -> c11;
c10 -> c12;
c11 -> c12;
}
这是输出(来自edotor.net):
Graphviz 图表(更新)
任何帮助是极大的赞赏!
编辑:这是我想要得到的:
解决方案
我相信问题的出现是因为它试图最小化垂直高度,解决这个问题的一种方法是传递minlen=2
到一些边缘,所以尝试:
c1 -> c12
c3 -> c6;
c3 -> c9;
c4 -> c5;
c5 -> c11;
c6 -> c7 [minlen=2];
c6 -> c11;
c6 -> c12;
c7 -> c8;
c9 -> c10 [minlen=2];
c10 -> c11;
c10 -> c12;
c11 -> c12;
您还可以尝试注释掉各种边缘以查看它们对最终图像的影响,constraint=false
如果要删除它的影响,您可以添加。
推荐阅读
- java - JAXB 不接受 CustomEscapeHandler
- typescript - onKeyPress 不产生在 React-Native Windows 中按下的键
- r - 如何将多个变量数据组合成一个变量数据?
- angular - 如何为相同的 url Angular 6 显示不同的视图(对于渐进式 Web 应用程序)
- python - 如何永远运行异步函数(Python)
- angular - forEach 对象角度
- linux - 如何在 Linux centOS 上关闭后自动启动 MongoDB 进程
- c - Makefile LINK.cc - main.o 被放在链接库之后并导致错误
- elasticsearch - Logstash 文件名作为 ElasticSearch 索引
- haskell - 符号微分的递归方案