Graphviz:将边缘标签放在另一侧 [英] Graphviz: Place edge label on the other side
本文介绍了Graphviz:将边缘标签放在另一侧的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
这可能与如何将边缘标签放到graphviz的边缘:我有以下图形,可以使用命令dot -Teps g.dot > g.eps
进行可视化:
This may be related to How to place edge labels ON edge in graphviz: I have the following graph, which I visualize using the command dot -Teps g.dot > g.eps
:
graph triple {
node [shape=box]; User; Object; Tag;
node [shape=diamond,style=filled]; Triple;
{
User -- Triple [label = "1"];
Object -- Triple [label = "1"];
}
{
rank=same;
User;
Object;
}
Triple -- Tag [label="n"];
}
我希望通过在图形的左侧将User和Triple之间放置标签,使结果更加对称.
I would like the result to be more symmetric by putting the label between User and Triple on the left side of the graph.
推荐答案
这是使用splines=false
和双边的第二种解决方法:
And here's the second workaround using splines=false
and double edges:
graph {
splines=false;
node [shape=box]; User; Object; Tag;
node [shape=diamond,style=filled]; Triple;
{
User -- Triple [label = "1"];
User -- Triple [label = ""];
Object -- Triple [label = ""];
Object -- Triple [label = "1"];
}
{
rank=same;
User;
Object;
}
Triple -- Tag [label="n"];
}
输出:
这篇关于Graphviz:将边缘标签放在另一侧的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文