27

我正在使用 graphviz 并想用splines = ortho. 问题是边缘不尊重端口,因此无法分析图形。

digraph G{
splines= ortho;

A [shape = box, label =<
                <TABLE BORDER="0" CELLBORDER="0" CELLSPACING="1"
CELLPADDING="2">
                <TR> <TD COLSPAN = "3"> A </TD></TR>

                <TR><TD PORT="1" BORDER = "1"> 1 </TD>
                        <TD ></TD>
                        <TD PORT="2" BORDER = "1"> 2 </TD>
                    </TR>
                </TABLE>>];

B [shape = box, label =<
                <TABLE BORDER="0" CELLBORDER="0" CELLSPACING="1"
CELLPADDING="2">
                <TR> <TD COLSPAN = "3"> B </TD></TR>

                <TR><TD PORT="1" BORDER = "1"> 1 </TD>
                        <TD ></TD>
                        <TD PORT="2" BORDER = "1"> 2 </TD>
                    </TR>
                </TABLE>>];

C [shape = box, style = filled, label =<
                <TABLE BORDER="0" CELLBORDER="0" CELLSPACING="1"
CELLPADDING="2">
                <TR> <TD COLSPAN = "3"> C </TD></TR>

                <TR><TD PORT="1" BORDER = "1"> 1 </TD>
                        <TD ></TD>
                        <TD PORT="2" BORDER = "1"> 2 </TD>
                    </TR>
                <TR> <TD PORT = "3" BORDER = "1"> 3 </TD></TR>
                </TABLE>>];

K [shape = box, label =<
                <TABLE BORDER="0" CELLBORDER="0" CELLSPACING="1"
CELLPADDING="2">
                <TR> <TD COLSPAN = "3"> K </TD></TR>

                <TR><TD PORT="1" BORDER = "1"> 1 </TD>
                        <TD ></TD>
                        <TD PORT="2" BORDER = "1"> 2 </TD>
                    </TR>
                </TABLE>>];

A:1 -> B:2;
A:2 -> B:2;
A:2 -> C:1;
B:1 -> C:1;
K:2 -> C:1;
B:2 -> K:1;
K:2 -> A:1;
B:1 -> C:3;
K:2 -> D;
K:2 -> E;
}

结果:

样条 = 正交结果

我在官方 graphviz 网站上发现了这个问题,但自 2011 年以来似乎没有任何改善。有谁知道绕过这个问题的方法?或者我有机会自己修复它吗?

4

0 回答 0