How do I position the label of a graphviz subgraph cluster to be on the left?
Asked Answered
M

1

18

How do I position the label for subgraph cluster to appear at it's left instead of being centered?

digraph mygraph {
    test1;

    subgraph cluster_mysubgraph {
        label = "This text should be at the left of the subgraph - not centered!";

        test2;
        test3;
        test4;
        test5;
        test6;
        test7;
    }

    test1 -> {test2, test3, test4, test5, test6, test7};
}
Malita answered 7/3, 2016 at 8:2 Comment(1)
Btw I get errors when separating nodes with simple commas as in the last line - I replaced them with semicolons.Kalong
K
36

You may simply add labeljust="l"; within your subgraph.

Kalong answered 7/3, 2016 at 8:50 Comment(1)
folks might also want to set labels to the bottom in a subgraph with labelloc="b";Basque

© 2022 - 2024 — McMap. All rights reserved.