Graphviz Dot,混合有向和无向 [英] Graphviz Dot, mix directed and undirected

查看:21
本文介绍了Graphviz Dot,混合有向和无向的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

对于我的应用程序,我需要同时表示(在同一张图中)两种关系:一种是对称的,另一种不是.

For my application I need to represent simultaneously (on the same graph) two relations: one is simmetric, the other is not.

目标:

  • 理想情况下,这两种关系应该导致边缘具有不同的颜色;
  • 对于对称关系,我不希望有双边;

有没有办法用 dot 做到这一点?

Is there a way of doing this with dot?

推荐答案

digraph {

    A; B; C

    subgraph Rel1 {
        edge [dir=none, color=red]
        A -> B -> C -> A
    }

    subgraph Rel2 {
        edge [color=blue]

        B -> C
        C -> A
    }

}

这篇关于Graphviz Dot,混合有向和无向的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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