graphgraphvizrelationsymmetry

Graphviz Dot, mix directed and undirected


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

Targets:

Is there a way of doing this with dot?


Solution

  • digraph {
    
        A; B; C
    
        subgraph Rel1 {
            edge [dir=none, color=red]
            A -> B -> C -> A
        }
    
        subgraph Rel2 {
            edge [color=blue]
    
            B -> C
            C -> A
        }
    
    }
    

    enter image description here