Rankdir ignored when drawing

Viewed 20

I am trying to make the following digraph face a different direction, from top to bottom, instead of left to right. I have placed rankdir=tb and rank=same for the nodes I would like to be together, but I cannot get the wanted result (which you can see here). Does anyone know why this is happening? The source is directly provided from pygraphviz.

strict digraph "" {
        graph [overlap=false,
                rankdir=tb,
                ranksep=.1,
                splines=ortho
        ];
        node [label="\N"];
        {
                graph [rank=same];
                computerVisionPipeline  [color=black,
                        fillcolor=salmon,
                        fontcolor=black,
                        fontname="verdana bold",
                        fontsize=14,
                        label="1.computerVisionPipeline",
                        name="1.computerVisionPipeline",
                        shape=box,
                        style=filled];
                "computerVisionPipeline.focalDepthsComputation" [color=black,
                        fillcolor=lightblue,
                        fontcolor=black,
                        fontname="verdana bold",
                        fontsize=14,
                        label="2.focalDepthsComputation",
                        name="2.focalDepthsComputation",
                        shape=box,
                        style=filled];
                computerVisionPipeline -> "computerVisionPipeline.focalDepthsComputation";
                "computerVisionPipeline.multiStackDepthsSelection"      [color=black,
                        fillcolor=lightblue,
                        fontcolor=black,
                        fontname="verdana bold",
                        fontsize=14,
                        label="3.multiStackDepthsSelection",
                        name="3.multiStackDepthsSelection",
                        shape=box,
                        style=filled];
                "computerVisionPipeline.focalDepthsComputation" -> "computerVisionPipeline.multiStackDepthsSelection";
                "computerVisionPipeline.multiDepthSourcesProcessing"    [color=black,
                        fillcolor=lightblue,
                        fontcolor=black,
                        fontname="verdana bold",
                        fontsize=14,
                        label="4.multiDepthSourcesProcessing",
                        name="4.multiDepthSourcesProcessing",
                        shape=box,
                        style=filled];
                "computerVisionPipeline.multiStackDepthsSelection" -> "computerVisionPipeline.multiDepthSourcesProcessing";
                "computerVisionPipeline.multiDepth"     [color=black,
                        fillcolor=salmon,
                        fontcolor=black,
                        fontname="verdana bold",
                        fontsize=14,
                        label="5.multiDepth",
                        name="5.multiDepth",
                        shape=box,
                        style=filled];
                "computerVisionPipeline.multiDepthSourcesProcessing" -> "computerVisionPipeline.multiDepth";
                "computerVisionPipeline.multiDepthAggregation"  [color=black,
                        fillcolor=lightblue,
                        fontcolor=black,
                        fontname="verdana bold",
                        fontsize=14,
                        label="8.multiDepthAggregation",
                        name="8.multiDepthAggregation",
                        shape=box,
                        style=filled];
                "computerVisionPipeline.multiDepth" -> "computerVisionPipeline.multiDepthAggregation";
                "computerVisionPipeline.cellDetection"  [color=black,
                        fillcolor=lightblue,
                        fontcolor=black,
                        fontname="verdana bold",
                        fontsize=14,
                        label="9.cellDetection",
                        name="9.cellDetection",
                        shape=box,
                        style=filled];
                "computerVisionPipeline.multiDepthAggregation" -> "computerVisionPipeline.cellDetection";
                "computerVisionPipeline.cellSelection"  [color=black,
                        fillcolor=lightblue,
                        fontcolor=black,
                        fontname="verdana bold",
                        fontsize=14,
                        label="10.cellSelection",
                        name="10.cellSelection",
                        shape=box,
                        style=filled];
                "computerVisionPipeline.cellDetection" -> "computerVisionPipeline.cellSelection";
                "computerVisionPipeline.featuresExtraction"     [color=black,
                        fillcolor=lightblue,
                        fontcolor=black,
                        fontname="verdana bold",
                        fontsize=14,
                        label="11.featuresExtraction",
                        name="11.featuresExtraction",
                        shape=box,
                        style=filled];
                "computerVisionPipeline.cellSelection" -> "computerVisionPipeline.featuresExtraction";
                "computerVisionPipeline.featuresSaving" [color=black,
                        fillcolor=lightblue,
                        fontcolor=black,
                        fontname="verdana bold",
                        fontsize=14,
                        label="12.featuresSaving",
                        name="12.featuresSaving",
                        shape=box,
                        style=filled];
                "computerVisionPipeline.featuresExtraction" -> "computerVisionPipeline.featuresSaving";
        }
        {
                graph [rank=same];
                "computerVisionPipeline.multiDepth.reconstruction"      [color=black,
                        fillcolor=lightblue,
                        fontcolor=black,
                        fontname="verdana bold",
                        fontsize=14,
                        label="6.reconstruction",
                        name="6.reconstruction",
                        shape=box,
                        style=filled];
                "computerVisionPipeline.multiDepth.normalization"       [color=black,
                        fillcolor=lightblue,
                        fontcolor=black,
                        fontname="verdana bold",
                        fontsize=14,
                        label="7.normalization",
                        name="7.normalization",
                        shape=box,
                        style=filled];
                "computerVisionPipeline.multiDepth.reconstruction" -> "computerVisionPipeline.multiDepth.normalization";
        }
        "computerVisionPipeline.multiDepth" -> "computerVisionPipeline.multiDepth.reconstruction";
}
0 Answers
Related