Skip to content

HTML-like tables

Engine
dot
Command, both sides
dot -Kdot -Tsvg input.gv
Input
tests/fixtures/html2.gv · 1,414 bytes
Features
HTML labelsportsfonts
Result
identical on macOSidentical under portable math
Comparing…
C Graphviz 16.1.0 output, cyan plategraphviz-pure, native macOS build output, magenta plate

C onlyport onlyboth: in register

Input

html2.gv
digraph G {
rankdir=LR
node [shape=plaintext]
a [
label=<
<TABLE BORDER="0" CELLBORDER="1" CELLSPACING="0">
<TR><TD ROWSPAN="3" BGCOLOR="yellow">class</TD></TR>
<TR><TD PORT="here" BGCOLOR="lightblue">qualifier</TD></TR>
</TABLE>>
]
b [shape=ellipse style=filled
href="http://www.graphviz.org/content/node-shapes"
label=<
<TABLE BGCOLOR="bisque" href="http://www.graphviz.org/content/node-shapes#html">
<TR><TD COLSPAN="3" BGCOLOR="bisque" href="http://go/wiki/Elephant">elephant</TD>
<TD ROWSPAN="2" BGCOLOR="chartreuse"
VALIGN="bottom" ALIGN="right">two</TD> </TR>
<TR><TD COLSPAN="2" ROWSPAN="2">
<TABLE BGCOLOR="grey" href="http://go/wiki/Grey">
<TR> <TD href="http://go/wiki/Sweet_corn">corn</TD> </TR>
<TR> <TD BGCOLOR="yellow">c</TD> </TR>
<TR> <TD href="http://go/wiki/F">f</TD> </TR>
</TABLE> </TD>
<TD BGCOLOR="white">penguin</TD>
</TR>
<TR> <TD COLSPAN="2" BORDER="4" ALIGN="right" PORT="there">4</TD> </TR>
</TABLE>>
]
c [
label=<long line 1<BR/>line 2<BR ALIGN="LEFT"/>line 3<BR ALIGN="RIGHT"/>>
]
subgraph { rank=same b c }
a:here -> b:there [dir=both, arrowtail = diamond]
c -> b
d [shape=triangle]
d -> c [label=<
<TABLE>
<TR><TD BGCOLOR="red" WIDTH="10"> </TD>
<TD>Edge labels<BR/>also</TD>
<TD BGCOLOR="blue" WIDTH="10"> </TD>
</TR>
</TABLE>>
]
}

Files

FileBytesSHA-256
input.gv1,414
c.svg C7,749aa71f3a71869aff115f8535c8a3b99faff4b3478f71a45568fb39e4a4de15186
rust.svg Rust7,76076683d32b76d1a06046d08827fb9d73355fd14faf1bc3ddd376db76306ad4464

The two hashes differ even when the outputs are identical, because each file keeps its own generator comment. Made by scripts/site-samples.sh.