如何避免HTML graphviz中的双边框

时间:2015-05-18 10:44:08

标签: graphviz dot pygraphviz

我有以下简单 图表中的节点:

    digraph "graph.svg" {
    graph [bgcolor="#333333" fontcolor=white fontname=Helvetica fontsize=16 label="Title" rankdir=TB]
        0 [label=<<TABLE BORDER="0" CELLBORDER="1" CELLSPACING="0" CELLPADDING="2" BGCOLOR="#006699"> 
                      <TR>
                        <TD COLSPAN="2">Node Titel</TD>
                      </TR>
                      <TR>
                        <TD COLSPAN="2">Sieve</TD>
                      </TR>
                      <TR>
                        <TD CELLPADDING="0">
                            <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0" BGCOLOR="#006699"> 
                              <TR>
                                <TD BORDER="1">in 1</TD>
                              </TR>
                              <TR>
                                <TD BORDER="1">in 2</TD>
                              </TR> 
                           </TABLE>
                        </TD>
                        <TD CELLPADDING="0">
                             <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0" BGCOLOR="#006699"> 
                              <TR>
                                <TD BORDER="1">out 1</TD>
                              </TR>
                              <TR>
                                <TD BORDER="1">out 2</TD>
                              </TR> 
                              <TR>
                                <TD BORDER="1">out 3</TD>
                              </TR> 
                           </TABLE>
                        </TD>
                        </TR> 
                   </TABLE>> shape=plaintext]
}

产生此输出:

Output

如何使边框对齐,使嵌套表之间不出现任何双边框? 我设法摆弄了CELLSPADING = -1 但我不认为这是要走的路? 我不能使用COLSPAN选项,因为输入和输出端口的大小是可变的,这就是我用输入和输出单元的嵌套表解决这个问题的原因。

1 个答案:

答案 0 :(得分:1)

你在附近

digraph "graph.svg" {
graph [bgcolor="#333333" fontcolor=white fontname=Helvetica fontsize=16 label="Title" rankdir=TB]
    0 [label=<<TABLE BORDER="0" CELLBORDER="1" CELLSPACING="0" CELLPADDING="2" BGCOLOR="#006699"> 
                  <TR>
                    <TD COLSPAN="2">Node Titel</TD>
                  </TR>
                  <TR>
                    <TD COLSPAN="2">Sieve</TD>
                  </TR>
                  <TR>
                    <TD CELLPADDING="0" BORDER="0">
                        <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0" BGCOLOR="#006699"> 
                          <TR>
                            <TD BORDER="1">in 1</TD>
                          </TR>
                          <TR>
                            <TD BORDER="1">in 2</TD>
                          </TR> 
                       </TABLE>
                    </TD>
                    <TD CELLPADDING="0" BORDER="0">
                         <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0" BGCOLOR="#006699"> 
                          <TR>
                            <TD BORDER="1">out 1</TD>
                          </TR>
                          <TR>
                            <TD BORDER="1">out 2</TD>
                          </TR> 
                          <TR>
                            <TD BORDER="1">out 3</TD>
                          </TR> 
                       </TABLE>
                    </TD>
                    </TR> 
               </TABLE>> shape=plaintext]
}

enter image description here