CBK
CBK

Reputation: 700

GraphViz - How To Draw These Edges

Heylo, I just wanted to see if edges like the ones I've mocked up in the image below (in blue/cyan) are possible... I've tried a lot of different combinations of edge attributes and I'm really struggling on getting the edges to look clean and organized and not taking the shortest path possible.

Edge Example

My code is as follows and I do not want the subgraphs to move from their current positions so I know a ‘constraint = false’ will be required for the edges.

digraph G
{
    graph [compound = true];
    splines = false;
    node [style = bold, shape = record, fontcolor = magenta];

    subgraph cluster0
    {
        style = bold; label = “Mac”;
        edge [style = invisible, arrowhead = none];
        “Finder” -> “Terminal” -> “Safari”;
    }

    subgraph cluster1
    {
         style = bold; label = “Windows”;
         node_1 [label = “<f0> Start|<f1> Command Prompt”];
    }

    subgraph cluster2
    {
         style = bold; label = “Linux”;
         node_2 [label = “<f0> Start|<f1> Konsole”];
    }
}

Thank you in advance!

Upvotes: 0

Views: 1022

Answers (1)

Barton Chittenden
Barton Chittenden

Reputation: 4418

I don't have a direct answer, but PlantUML sits on top of GraphVis and generates edges similar to what you're looking for -- so you may be able to generate the .dot file ( see the second example under Conditional ), inspect the edges there.

Upvotes: 1

Related Questions