equal widths for boxes in graphviz
Asked Answered
T

1

6

Is it possible to get two boxes to be as wide as the widest one.

digraph G {
        node[shape=box];
        "A long description of a node" -> "short description";
}

Will produce:

enter image description here

But I want the two boxes' size to be aligned.

Titanesque answered 4/6, 2016 at 9:57 Comment(0)
D
8

You can control the (minimum) size of the box with the width and height parameters:

digraph G {
        node[shape=box, width = 2.5, height = .75 ];
        "A long description of a node" -> "short description";
}

yields

enter image description here

Documentation answered 4/6, 2016 at 16:52 Comment(1)
I was hoping there would be an automatic way but that's good enough for my case.Titanesque

© 2022 - 2024 — McMap. All rights reserved.