[英]GraphViz Dot layout of nodes without an edge
I'm calculating quite big layouts with the GraphViz dot layout. 我正在使用GraphViz点布局来计算相当大的布局。 My source structure is a graph where some nodes are connected and others not.
我的源代码结构是一个图,其中某些节点已连接,而其他节点未连接。 The layout for the connected nodes is perfect, but dot alignes all other nodes in a straight row, which leads to a quite huge length of the output.
连接的节点的布局是完美的,但是点将所有其他节点排成一条直线,这导致输出的长度很大。 Is there any change to get rid of this?
有什么要摆脱的变化吗?
There is a program called unflatten
in the Graphviz suite that can be used for this. Graphviz套件中有一个名为
unflatten
的程序可用于此目的。 An example of usage: 用法示例:
unflatten -c 2 graph.dot | dot -Tpng -o graph.png
where you tell unflatten to chain disconnected nodes up to a length of 2. This will create invisible edges that prevent the nodes from being lined up as you describe. 在这里,您告诉unflatten将不连续的节点链接起来,最大长度为2。这将创建不可见的边缘,从而防止节点按照您的描述对齐。 For more details, see the documentation .
有关更多详细信息,请参见文档 。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.