【发布时间】:2021-07-06 22:12:59
【问题描述】:
我有一个这样的图表:
问题一:有没有办法让两列在顶部水平对齐?
如果我想要一个箭头a5 -> a1,那么图表将是:
问题 2:有没有办法让图表像以前一样干净?
代码如下:
digraph {
rankdir="LR";
// overlap=false;
nodesep="0.2";
ranksep="0.4";
fontsize = 25
labelloc="t";
fontname="Lato";
node [ shape="plaintext" style="filled, rounded" fontname="Lato" margin=0.2 ]
edge [ fontname="Lato" color="#2B303A" ]
subgraph cluster_0 {
style=filled;
color=lightgrey;
label = "Column 1";
fontsize = 20
node [style=filled,color=white];
a1
a2
a3
a4
a5
}
subgraph cluster_1 {
node [style=filled];
color=blue
label = "Column 2";
fontsize = 20
// labeljust=r
// labelloc=b
b1
b2
b3
b4
}
a1 -> b1
b1 -> a2
a2 -> b2
b2 -> a3
a3 -> b3
b3 -> a4
a4 -> b4
b4 -> a5
a5 -> a1
}
【问题讨论】:
标签: graphviz