Graphviz允许边缘节点重叠 [英] Graphviz allow edge-node overlap

查看:154
本文介绍了Graphviz允许边缘节点重叠的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想对一个项目使用graphviz,但无法获得我想要的行为.我有一个可以用graphviz绘制的图形,但是我也有一个相同图形的版本,它具有一些额外的边缘.我希望在绘制第二个图时,将节点与第一个图放置在相同的位置,并将边缘放置在相同的位置,但是要绘制新的边缘而又避免与节点没有任何重叠.

I would like to use graphviz for a project and am unable to get the behaviour I want. I have a graph that I can draw with graphviz just fine, but I also have a version of the same graph that has some extra edges. I would like the second graph to be drawn with the nodes in the same positions as the first one and the edges in the same positions, but the new edges to be drawn without avoiding any overlap with nodes.

要更好地了解我想要的内容,请想象一张带有图形的Powerpoint幻灯片,然后在下一张幻灯片上,将具有这些多余边的相同图形显示在第一个图形的顶部,而无需修改旧零件的外观图的.这就是我想要的效果.

To get a better idea of what I want, imagine a Powerpoint slide with a graph and then on the next slide the same graph with these extra edges that appear on top of the first graph, wihtout modifying the look of the old parts of the graph. That is the effect I want.

我认为可以通过使某些边缘忽略任何重叠约束来实现效果.我无法弄清楚如何控制特定边缘(甚至所有边缘)的边缘和节点之间的重叠.

I think the effect could be achieved by having some edges ignore any overlapping constraints. I could not figure out how to control the overlap between edges and nodes for particular edges (or even for all edges).

有什么想法吗?

推荐答案

您可以通过dot -Tdot(或也许是dot -Txdot)获取dot来输出另一个.dot文件,该文件的位置已分配给所有元素.将其他边添加到该文件,然后再次通过dot运行它以生成第二张图.

You can get dot to output another .dot file, with positions assigned to all elements, via dot -Tdot (or maybe dot -Txdot). Add your additional edges to that file, and run it through dot again to produce your second graph.

这篇关于Graphviz允许边缘节点重叠的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆