【发布时间】:2012-12-24 12:22:40
【问题描述】:
我在 Windows 7 上使用 GraphViz 2.28 (the current stable version),以下代码导致 Graphviz/Dot 崩溃。
digraph G {
ranksep = 1.0; size = "10,10";
{
node [shape = plaintext, fontsize = 20];
GAWM1 -> GAWM2 -> 0;
}
node [shape = box];
{rank = same;0;wx1;wx2;rx1;}
wx1 -> wx2;
wx2 -> rx1;
wx1 -> rx1[color = blue];
subgraph struct
{
node [shape = record];
rx11 [shape = record, label = "rx1 | [x=[wx2]]"];
}
{rank = same; GAWM1; "rx11";}
// W'WR Order:
wx2 -> wx1[style = dashed, color = red, label = "1"]; }
当我对这个例子进行一些实验时,事情变得很奇怪:
- 仅最后一条语句“wx2 -> wx1[style = dashed, color = red, label = "1"];" 时效果很好被移除;
- 只去掉第八行“{rank = same;0;wx1;wx2;rx1;}”时效果很好;
- 当只删除最后一条语句中的标签(即“, label = “1””)时也能正常工作。
我已将问题报告给Graphviz Issue Tracker,尚未回复。你能帮忙找出原因吗?
谢谢。
【问题讨论】:
-
我试过你的脚本,遇到了 dot.exe 和 gvedit.exe 的崩溃。 Circo.exe 和 Neato.exe 在此示例上工作正常。
-
@AxelKemper 感谢您的反馈。但是,Graphviz 网站上关于 Circo 和 Neato 的陈述对我来说没有意义。如果我想使用 Circo 或 Neato,你能解释一下我应该怎么做吗?再次感谢。
-
Graphviz 提供了几个相关但不同的布局引擎。当图形节点可以很好地以圆形排列显示时,Circo 是我的最爱。请参阅graphviz.org 您的示例包含一个“子图”。因此,您可能与“dot.exe”(“'分层'或有向图的分层绘图。这是边缘具有方向性时使用的默认工具。”)
标签: graphviz dot graph-visualization