当使用花键= true中的graphviz中时,平行边缘将合并为1
我正在使用graphviz(dot)生成一个无向的多编码,其中许多边缘与节点重叠,我还必须平行边缘(2个带有多个边缘的节点)。
我尝试使用花键= true来删除重叠,但这只是使大量的平行边缘合并到一个边缘中。
这是我的图表上带有和没有花纹的图片:
我想要获得的东西将是一种可视化并行边缘而无需妥协的方式图形清晰度。
我用较小的图表复制了这个问题:
这是此较小图的点代码:
graph G {
bgcolor = grey
layout = fdp
outputorder = edgesfirst
splines = false
a [color = white, style = filled, shape = circle ]
b [color = white, style = filled, shape = circle ]
b [color = white, style = filled, shape = circle ]
c [color = white, style = filled, shape = circle ]
d [color = white, style = filled, shape = circle ]
e [color = white, style = filled, shape = circle ]
f [color = white, style = filled, shape = circle ]
g [color = white, style = filled, shape = circle ]
h [color = white, style = filled, shape = circle ];
a--b [color=red]
a--b [color=blue]
a--g [color=red]
a--f [color=blue]
a--c [color=black]
a--d [color=red]
b--h [color=black]
e--h [color=blue]
e--d [color=black]
e--g [color=red]
c--f [color=black]
c--f [color=red]
b--d [color=blue]
g--b [color=black]
h--a [color=red]
I'm using graphviz (dot) to generate an undirected multigraph where a lot of the edges are overlapping with nodes and I also have to parallel edges (2 nodes with multiple edges).
I tried to use splines = true to remove the overlap but that just made a ton of parallel edges merge into a single edge.
Here is a Picture on my graph with and without splines:
What I am looking to get would be a way to visualize the parallel edges without having to compromise with graph clarity.
I replicated this issue with a smaller graph:
Here is the dot code for this smaller graph:
graph G {
bgcolor = grey
layout = fdp
outputorder = edgesfirst
splines = false
a [color = white, style = filled, shape = circle ]
b [color = white, style = filled, shape = circle ]
b [color = white, style = filled, shape = circle ]
c [color = white, style = filled, shape = circle ]
d [color = white, style = filled, shape = circle ]
e [color = white, style = filled, shape = circle ]
f [color = white, style = filled, shape = circle ]
g [color = white, style = filled, shape = circle ]
h [color = white, style = filled, shape = circle ];
a--b [color=red]
a--b [color=blue]
a--g [color=red]
a--f [color=blue]
a--c [color=black]
a--d [color=red]
b--h [color=black]
e--h [color=blue]
e--d [color=black]
e--g [color=red]
c--f [color=black]
c--f [color=red]
b--d [color=blue]
g--b [color=black]
h--a [color=red]
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您正在击中一个错误,该错误是在版本2.43.0后某个时候引入的。它似乎会影响除 dot 外的每个引擎。
我建议在这里报告此错误: https://gitlab.com/graphviz/graphviz/graphviz/graphviz/graphviz/-/issues 。
尚未找到工作。
You are hitting a bug, introduced sometime after version 2.43.0. It seems to affect every engine except dot.
I suggest reporting this bug here: https://gitlab.com/graphviz/graphviz/-/issues.
No work-arounds found, yet.
layout = fdp
layout = fdp