GraphViz, grouping the same edges

房东的猫 提交于 2019-11-27 22:46:49

I think it really depends on what your desired output would be. One possibility is:

digraph G {
   graph [ splines = false ]
   a -> b [ label = "foo" ];
   a -> b [ label = "bar" ];
 }

Where not using splines draws edges with straight line segments and so duplicate edges will not be distinguished visually.

In your ideal output, what would the single edge look like since there are to be two different labels for it?

The "strict" keyword may help you.

strict digraph G {
  a -> b [ label = "foo" ];
  a -> b [ label = "bar" ];
}

This will combine the edges. But I believe it will only apply the first label.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!