GraphViz,将相同的边缘分组 [英] GraphViz, grouping the same edges

查看:130
本文介绍了GraphViz,将相同的边缘分组的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

这将在'a'和'b'节点之间创建两个边.有没有办法只有一个边缘(将它们分组)?

This will create two edges between the 'a' and 'b' nodes. Is there a way to have only one edge (group them)?

推荐答案

我认为这确实取决于您所需的输出.一种可能性是:

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?

这篇关于GraphViz,将相同的边缘分组的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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