graphviz - 添加边缘中断graphviz点布局
问题描述
我正在尝试在 graphviz dot 中制作一个垂直方向的流程图。我是这种格式的新手,所以请放轻松。我的布局 99% 正确,但是当我添加最后一条边 ( data -> h
) 时它会中断。我注意到如果我添加最后的边缘,但删除“是”标签,格式也是正确的。我把它归结为一个简单的例子,它仍然显示出不受欢迎的行为。
我的问题:我怎样才能保持我想要的垂直格式,保持data -> h
边缘,并保持“是”标签。
理想,但缺少最终优势:
破碎的,最后的data -> h
边缘:
理想,具有最终data -> h
边缘,但删除了“是”标签:
digraph G {
a [
label = "a";
shape = diamond;
];
b [
label = "b";
shape = rect;
];
makedata [
label = "makedata";
shape = rect;
];
data [
label = "data";
shape = box3d;
]
filldata [
label = "filldata";
shape = rect;
]
num [
label = "num"
shape = box3d;
]
num2 [
label = "num2"
shape = box3d;
]
prepdata [
label="prepdata"
shape=rect;
]
prepdata2 [
label="prepdata2"
shape=rect;
]
lorem [
label="lorem_ipsum_dolor_sit"
shape="rect"
]
lorem2 [
label="lorem_ipsum_dolor_sit"
shape="rect"
]
h [
label="h"
shape="rect"
]
{
rank=same;
filldata;data
}
{
rank=same;
num2;prepdata2
}
// if data -> h is included, and this label is removed, formatting is also correct
a:s -> b [label="Yes"]
b -> makedata
makedata:e -> data:w
makedata -> filldata [weight=99]
filldata:e -> data:w
filldata->prepdata [weight=99]
data -> prepdata
data -> prepdata2
data -> lorem:ne
prepdata -> lorem:n [weight=99]
lorem -> prepdata2 [weight=99]
num:e->prepdata:w
num2:e->prepdata2:w [weight=99]
prepdata2:s -> lorem2:n [weight=99]
data -> lorem2
lorem2 -> h [weight=99]
// data -> h # the problem
}
解决方案
推荐阅读
- c# - 使用 HtmlAgilityPack 获取 HTML 代码的内容
- c# - 根据实体框架中的特定列获取不同的条目
- python - 如何使用 numba 在内核中分配数组?
- reactjs - 是否可以从代码沙箱本身构建一个反应应用程序?
- javascript - react-native-camera 将图像 base64 转换为 jpeg
- c - 相对较小的阵列上的分段错误
- c - 函数返回 4 作为素数
- java - 泛型:“未经检查的分配”警告
- javascript - 表格中有多个菜单,无法正确切换
- c# - EmguCV OCR Tesseract 不同的颜色和大小 - C# 中的深度学习