[graphviz-interest] GraphViz 2.34 dot: how to keep the aspect ratio of an unconnected graph reasonable?
Jeremy Friesner <[email protected]> Tue, 6 May 2014 08:22:25 -0700
| Newsgroups | gmane.comp.video.graphviz |
|---|---|
| Message-ID | <[email protected]> |
Hi all, Here's a screenshot of my program showing an unconnected dot-generated graph with two clusters: https://public.msli.com/lcs/jaf/unconnected_graph.png The problem is that when there are no connections between nodes, dot places all the nodes in the graph into a single column, making the graph very tall and thin, and therefore hard to use — you have to either zoom way out, or make the window very tall, or both, in order to see the graph in its entirety. Is there some way to encourage dot to keep the graph's aspect ratio more moderate in this scenario? Just placing the clusters next to each other (rather than above and below each other) would probably be sufficient; or placing the nodes within a cluster in multiple columns could help too. If there was some way to tell dot to try to approximate a 1:1 or 3:2 aspect ratio when possible, that would be ideal. -Jeremy ps For what it's worth, I make the following setup calls when rendering my graph (simplified code): graph_t * graph = agopen(NULL, Agdirected, NULL); (void) agsafeset(graph, "rankdir", "LR", ""); (void) agattr(graph, AGRAPH, "label", ""); [… add subgraphs and nodes…] gvLayout(gvc, graph, "dot"); [… render graph to graphics….] gvFreeLayout(gvc, graph); agclose(graph); _______________________________________________ [email protected] http://lists.research.att.com/mailman/listinfo/graphviz-interest