views:

79

answers:

1

How does one set the size of the output image in GraphViz via the DOT format?

I'm using QuickGraph and this technique to render a GraphViz. As in the example below, I'm trying to set the maximum size of the rendering. I've tried lots of variations on size (interpreted as inches or as pixels) and pagesize, both, each. Doesn't matter. The only thing that has an effect is resolution.

I can't tell if it's some mode that I don't have set (i.e. mode = "fixedsize"), if it's bad syntax coming out of QuickGraph or if it's a bug in GraphViz. I doubt the second and third heavily, but I'm just throwing it out there.

digraph G {
size="(20,20)",  resolution=72, bgcolor="#C6CFD532"
0 [fontcolor="#2F4F4FFF", style=filled, label="Resource A('A')", color="#9FAE8DFF", fillcolor="#C4D6B6FF"];
1 [fontcolor="#2F4F4FFF", style=filled, label="Resource B('B')", color="#9FAE8DFF", fillcolor="#C4D6B6FF"];
2 [fontcolor="#2F4F4FFF", style=filled, label="Resource C('C')", color="#9FAE8DFF", fillcolor="#C4D6B6FF"];
3 [fontcolor="#2F4F4FFF", style=filled, label="Resource D('D')", color="#9FAE8DFF", fillcolor="#C4D6B6FF"];
4 [fontcolor="#2F4F4FFF", style=filled, label="Resource E('E')", color="#9FAE8DFF", fillcolor="#C4D6B6FF"];
5 [fontcolor="#2F4F4FFF", style=filled, label="Resource F('F')", color="#9FAE8DFF", fillcolor="#C4D6B6FF"];
6 [fontcolor="#FFFAF0FF", style=filled, label="Resource G('G')", color="#762226FF", fillcolor="#93473BFF"];
7 [fontcolor="#2F4F4FFF", style=filled, label="Resource H('H')", color="#9FAE8DFF", fillcolor="#C4D6B6FF"];
0 -> 1 [];
0 -> 2 [];
1 -> 2 [];
1 -> 3 [];
2 -> 3 [];
2 -> 4 [];
2 -> 5 [];
2 -> 6 [];
3 -> 7 [];
3 -> 1 [];
4 -> 5 [];
4 -> 6 [];
6 -> 4 [];
}
+1  A: 

My dot considers size="(20,20)", a syntax error preferring

size="20,20"; resolution=72; bgcolor="#C6CFD532";

and the DOT specification seems to bear this out.

msw
So it's a bug in QuickGraph then, it seems! Thanks!
uosɐſ