Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Getting GraphViz to eliminate duplicate edges [duplicate]

Tags:

graphviz

I have the following .dot language file for GraphViz:

digraph {
    graph [ dpi = 300 ];
    Hello -> World
    Hello -> World
    Hello -> World
}

Which renders as:

enter image description here

But I don;t want the duplicate links i.e. I want it to render as:

enter image description here

Yes, I could add logic to the program that produces the dot file, but if there is a GraphVix parameter to do this it’d be very useful.

Thanks.

Edit: Raising the dead here, but the question of which this is marked as a duplicate has multiple connections between 2 nodes but each with different labels, so not exactly the same, although the suggestion to use the ‘strict’ keyword does work.

like image 590
Steve Ives Avatar asked Jan 15 '18 15:01

Steve Ives


1 Answers

‘strict’ was the answer :

strict digraph {
    graph [ dpi = 300 ];
    Hello -> World
    Hello -> World
    Hello -> World
}
like image 56
Steve Ives Avatar answered Oct 01 '22 18:10

Steve Ives