graphviz - Graph rendering software, which respects relative order of Nodes and Edges -
i generating (graphviz) "dot" file given set of nodes, , edges. nodes ordered in y-dimension rank=same, in x-dimension within rank. edges sorted in order should drawn. unfortunately "dot" not respect order in x-dimension. if would, achieve crossing-free layout plane digraphs. no matter if cyclic, or acyclic.
my questions:
- how can tell "dot" respect relative order of nodes , edges
- is there alternative "dot", respects relative order, i.e. accepts layout, , physical rendering.
sorry, not able upload dot file.sample.dot file
thanks lot. thougt "rank=same;0;8;" implicitly means same "rank=same;0->8 [style=invis];". anyways, concern not crossing edge. seems bug, because there enough place left (6) , (2) draw line. 1 has move little right. algorithm generates order such every tree (green) edge can drawn down/right, every cross (orange) edge down/left, , every (red) edge up/left. no crossings, if graph plane. in order achieve this, (8) must drawn right of (0). happy, because happens, if use technique.
digraph { graph [charset=latin1, size ="19,46, 11,12"] node [shape=box, fontname="comic sans ms", fontsize=8, height=0.2, width=0.2, ordering=out] { rank=same; 0 -> 8 [style=invis]; } { rank=same; 1; } { rank=same; 2; } { rank=same; 5 -> 9; [style=invis]; } { rank=same; 6 -> 7 -> 10; [style=invis]; } { rank=same;3; } { rank=same;4; } 0 -> 1 [color=green] 1 -> 2 [color=green] 8 -> 2 [color=orange] 2 -> 5 [color=green] 5 -> 6 [color=green] 6 -> 2 [color=red, tailport=w, headport=w] 5 -> 7 [color=green] 7 -> 4 [color=green] 2 -> 3 [color=green] 2 -> 9 [color=green] 9 -> 10 [color=green] 10 -> 3 [color=orange] 3 -> 4 [color=orange] }
and layout of it1
Comments
Post a Comment