repka
repka

Reputation: 2979

Same rank for two records in dot

I have a trouble assigning the same rank to record nodes. Without node [shape=record] the graph works. Uncommenting that line and there's lost B C edge error.

graph {
    rankdir=LR
// uncommenting the following line gives "lost B C edge" error
//    node [shape=record]
    A--B
    A--C
    B--C
    {
        rank=same
        B
        C
    }
}

I do need record shape in my actual graph. I'm not just using it to get rectangular shape for nodes.

Upvotes: 3

Views: 556

Answers (1)

albert
albert

Reputation: 9057

When I un-comment the line (in http://www.webgraphviz.com/) I get:

enter image description here

Does the following give the result you want:

graph  {
    //rankdir=LR

    node [shape=record]
    A -- B
    A -- C
    B -- C
    {rank=same;B;C;}

}

i.e.

enter image description here

Otherwise - please make a sketch of what you want. - which version of graphviz are you using?

Upvotes: 3

Related Questions