Adam Matan
Adam Matan

Reputation: 136459

Graphviz: Node internal orientation

The following graphviz code:

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>>];
}

Gives:

enter image description here

I'd like to rotate the table orientation 90° clockwise, so that the rows will be:

For example (with the text wrongly oriented!):

enter image description here

Is there a way to rotate the node internals without affecting the order of the nodes in the graph?

Upvotes: 1

Views: 1492

Answers (1)

Adam Matan
Adam Matan

Reputation: 136459

I've played with the HTML COLSPAN and ROWSPAN and got:

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

Upvotes: 1

Related Questions