dot

Graphviz: How to go from .dot to a graph?

纵然是瞬间 提交于 2019-11-26 09:05:01
问题 I can\'t seem to figure this out. I have a .dot file, which is valid according to the syntax. How do I use graphviz to convert this into an image? (note that I\'m on Windows, not linux) 回答1: type: dot -Tps filename.dot -o outfile.ps If you want to use the dot renderer. There are alternatives like neato and twopi. If graphiz isn't in your path, figure out where it is installed and run it from there. You can change the output format by varying the extension of the filename specified with -o .

Distribute nodes on the same rank of a wide graph to different lines

戏子无情 提交于 2019-11-26 08:30:10
问题 I have a graph (organigram) how this: digraph G { nodesep=0.3; ranksep=0.2; margin=0.1; node [shape=rectangle]; edge [arrowsize=0.8]; 1 -> 2; 1 -> 3; 1 -> 4; 1 -> 5; 1 -> 6; 1 -> 7; 1 -> 8; 1 -> 9; 1 -> 10; } I have organigrams with 70 people and it\'s impossible to print in A4. How would I put nodes in 2 or 3 lines? 回答1: Here are two possibilities (see also this question): 1. Use the unflatten utility Graphviz provides a tool called unflatten. If you pre-process your graph using this command