My output SVG graph using Graphviz is stretched out more horizontally. How do I make it expand more vertically? Or is there a way to increase the length of the edges?
Asked
Active
Viewed 2,164 times
7
-
Please see my previous answer on this exact topic [answer](https://stackoverflow.com/questions/44735236/change-size-width-and-height-of-graph-graphviz-dot). Please remember to accept and upvote. – TomServo Jul 12 '17 at 10:22
-
@JLH Seems like that answer is for DOT file. I need something for SVG format – figaro Jul 14 '17 at 05:28
-
Hi @JLH Thanks for the answer. But I am really looking how to modify my SVG file itself so that the nodes are more spaced apart vertically. Here is my SVG file : https://gist.github.com/abhijitdhar/1ed86355a0180f8666d2f7fe3f9a6eb3 – figaro Jul 16 '17 at 22:57
-
See the "changing height" section [of this answer](https://stackoverflow.com/questions/44735236/change-size-width-and-height-of-graph-graphviz-dot). – TomServo Jul 16 '17 at 23:05
-
Yes, I saw the ranksep answer. But where should I put that attribute? It tried putting it both in
and – figaro Jul 16 '17 at 23:10 -
Hi @JLH I pasted my raw SVG here - https://gist.github.com/abhijitdhar/1ed86355a0180f8666d2f7fe3f9a6eb3?short_path=aca2160 – figaro Jul 16 '17 at 23:18
1 Answers
0
I had the same requirement. To specify the SVG output size use size attribute at the Graph level. (Units are inches, with '!' the drawing is scaled up uniformly until at least one dimension matches the size)
digraph "Custom Size Graph" {
graph [size="11,8.5!"];
Root -> A;
Root -> B;
Root -> C;
A -> D;
A -> E;
B -> F;
C -> G;
C -> H;
}

manchax
- 31
- 4