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

chaimp picture chaimp · Mar 7, 2016 · Viewed 8.5k times · Source

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};
}

Answer

marapet picture marapet · Mar 7, 2016

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