Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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.

like image 754
yonutix Avatar asked Jan 07 '20 20:01

yonutix


1 Answers

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;
}
like image 132
Emi Avatar answered Dec 30 '22 05:12

Emi