我想绘制图形(梯形轨迹表示),如下所示: 即没有节点形状和两个边缘标签:在边缘的头部和尾部。 我该怎么做才能做到这一点? (14,15 - 每个都有两个边的节点)
答案 0 :(得分:0)
几乎难看的解决方案(如果可以提高正确性,请进行编辑):
graph G {
rankdir = LR;
node [shape = point];
edge [minlen = 2, fontsize = 8]
a -- b [taillabel = "1", headlabel = "2"];
b -- c [taillabel = "4", headlabel = "15"];
b -- e [taillabel = "3", headlabel = "5"];
e -- d [taillabel = "6", headlabel = "8"];
e -- f [taillabel = "7", headlabel = "14"];
c -- d [taillabel = "15", headlabel = "9"];
f -- g [taillabel = "14", headlabel = "13"];
d -- g [taillabel = "10", headlabel = "11"];
g -- h [taillabel = "12", headlabel = "16"];
}
导致