graphviz-固定节点位置 [英] graphviz - fixed node positions
本文介绍了graphviz-固定节点位置的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有一个由neato处理的图形,正在为其添加新的边。但是,我不想移动旧的节点。我希望neato可以计算新节点的新位置,而旧节点则位于同一位置。
I have a graph that is processed by neato and I'm adding new edges to it. However, I don't want that the old nodes to be moved. I want that neato computes the new positions of the new nodes and the old nodes stay in the same place.
strict graph {
node0 [pos="1,2"];
node1 [pos="2,3"];
}
,然后添加新的边线:
strict graph {
node0 [pos="1,2"];
node1 [pos="2,3"];
node1 -- node2 [len="3"];
...
}
我想在旧节点。例如:
strict graph {
node0 [pos="1,2"];
node1 [pos="2,3"];
node2 [pos="3,4"];
...
}
我该怎么做?
推荐答案
您可以通过设置节点属性 pin = true
。
You can pin a node's position by setting the node attribute pin=true
.
或在pos属性的末尾添加!: pos = 34,12!
Or put a '!' at the end of the pos attribute: pos="34,12!"
这篇关于graphviz-固定节点位置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文