Graphviz dot set aspect ratio(16:9, 4:3 etc)
Asked Answered
E

1

6

Is there a way to setup the aspect ratio of a dot graph? I'm trying to obtain the smallest rectangle that contains the graph and has a specific aspect ratio.

I have been searching for this answer a lot and I could not find anything relevant.

Eulogize answered 7/1, 2020 at 20:45 Comment(0)
A
7

You can pass in a numerical value to ratio:

digraph G{
 ratio=1.3;
 node[shape=point, height=0.02, width=0.01];
 foo->bar;
}

Or set the size and pass in one of the options (see more options here).

digraph G{
 ratio="fill";
 size="4,3!";
 node[shape=point, height=0.02, width=0.01];
 foo->bar;
}
Arcanum answered 15/1, 2020 at 9:13 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.