2013-04-17 74 views
1

以下graphviz的代碼:的Graphviz:節點內部取向

digraph g { 

labelloc="t"; 
label="Feed creation process"; 

graph [ 
rankdir = "LR" 
]; 
node [ 
fontsize = "16" 
shape = "record" 
]; 
edge []; 


abc [shape=none, margin=0, rankdir="" 
label=< 
<TABLE BORDER="0" CELLBORDER="1" CELLSPACING="0" CELLPADDING="4"> 
<TR><TD ROWSPAN="3"><FONT COLOR="red">hello</FONT><BR/>world</TD> 
<TD COLSPAN="3">b</TD> 
<TD ROWSPAN="3" BGCOLOR="lightgrey">g</TD> 
<TD ROWSPAN="3">h</TD> 
</TR> 
<TR><TD>c</TD> 
<TD PORT="here">d</TD> 
<TD>e</TD> 
</TR> 
<TR><TD COLSPAN="3">f</TD> 
</TR> 
</TABLE>>]; 
} 

給出:

enter image description here

我想轉動表取向順時針旋轉90°,以使各行會:

  • hello world將在上面
  • f,「C | d |電子and b on the row below, 'c|d|e垂直對齊
  • g
  • h

例如(與文本錯誤取向的!):

enter image description here

是有一種方法可以在不影響圖中節點順序的情況下旋轉節點內部?

回答

1

我已經使用了與HTML COLSPANROWSPAN,並得到:

abc2 [shape=none, margin=0, orientation=120.0, 
label= 
    < 
    <TABLE BORDER="0" CELLBORDER="1" CELLSPACING="0" CELLPADDING="4"> 
     <TR> 
      <TD COLSPAN="3"><FONT COLOR="red">HELLO</FONT><BR/>world</TD> 
     </TR> 
     <TR> 
      <TD ROWSPAN="3">b</TD> 
      <TD>c</TD> 
      <TD ROWSPAN="3">f</TD> 
     </TR> 
     <TR> 
      <TD PORT="here">d</TD> 
     </TR> 
     <TR> 
      <TD>e</TD> 
     </TR> 
     <TR> 
      <TD COLSPAN="3" BGCOLOR="lightgrey">g</TD> 
     </TR> 
     <TR> 
      <TD COLSPAN="3">h</TD> 
     </TR> 

    </TABLE> 
    > 
]; 

enter image description here