【发布时间】:2021-08-22 20:33:11
【问题描述】:
我有四个子图,我希望 (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 Graph(更新)
非常感谢任何帮助!
编辑:这是我想要得到的:
【问题讨论】:
-
这很有挑战性(见gitlab.com/graphviz/graphviz/-/issues/1930)。 “荷马”应该如何出现 - 宽度方向?水平填充以匹配“Pre-Proto-Greek”?同一等级的所有节点?还是什么?
-
所有子图,包括“荷马”,都应该有相同的宽度。 “荷马”的内部节点很好。我添加了一个图表,大致显示了我想要获得的输出。
标签: width vertical-alignment graphviz subgraph