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:
But I want the two boxes' size to be aligned.
The size attribute lets you recommend a maximum or desired height and width for the output image in inches. I.e., the attribute size=3,5 tells Graphviz to generate a 3 by 5 inch image at most. If the image is smaller than 3 by 5 to begin with, Graphviz will leave it alone.
The special node shapes Msquare, Mcircle, and Mdiamond are simply an ordinary square, circle and diamond with the diagonals style set. The rounded style causes the polygonal corners to be smoothed. Note that this style also applies to record-based nodes.
If ordering="out" , then the outedges of a node, that is, edges with the node as its tail node, must appear left-to-right in the same order in which they are defined in the input. If ordering="in" , then the inedges of a node must appear left-to-right in the same order in which they are defined in the input.
How do I use graphviz to convert this into an image? For windows: dl the msi and install; Find gvedit.exe in your programs list; Open . dot file in question; Click running person on toolbar; Go to graph -> settings ; change Output file type to file type of your liking and press ok..
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With