简体   繁体   English

如何在GraphViz中生成矩形样式边而不是曲线?

[英]How can I generate rectangle style edges instead of curves in GraphViz?

I have generated Graphviz images with the dot language using the Pydot Python library. 我使用Pydot Python库使用点语言生成了Graphviz图像。

生成的Graphviz图

But the edges are getting draw in curves, and I need this kind of output: 但边缘正在绘制曲线,我需要这种输出:

预期的Graphviz

Please provide a solution using Graphviz. 请使用Graphviz提供解决方案。

This feature is called " orthogonal edge routing" and is available in Graphviz versions from September 28, 2010 and newer. 此功能称为“ 正交边缘路由”,可在2010年9月28日及更新版本的Graphviz版本中使用。 Use "graph [splines=ortho]"; 使用“graph [splines = ortho]”; see the Graphviz documentation . 请参阅Graphviz文档

digraph Orthogonal {
  graph [label="Orthogonal edges", splines=ortho, nodesep=0.8]
  node [shape=box]
  a->{b c}
  b->{d e}
  c->{f g}
}

在此输入图像描述

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM