Graphviz Diagrams¶
Graphviz SVG's¶
<center>
<span class="graphviz-light-dark" data-library-default="#789abc" data-default="#789abc" data-light="#000000" data-dark="#ffffff"></span><svg width="130pt" height="114pt" viewBox="0.00 0.00 130.00 113.75" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" class="graphviz dot"><g id="graph0" class="graph" transform="scale(0.46 0.46) rotate(0) translate(4 242.88)"><title>G</title><polygon fill="transparent" stroke="transparent" points="-4,4 -4,-242.88 278.15,-242.88 278.15,4 -4,4"/><!-- - --><g id="node1" class="node"><title>-</title><ellipse fill="none" stroke="#789abc" stroke-width="3" cx="118.58" cy="-211.3" rx="27.65" ry="27.65"/><text text-anchor="middle" x="118.58" y="-204.4" font-family="fira code" font-size="28.00" fill="#789abc">-</text></g><!-- x --><g id="node2" class="node"><title>x</title><ellipse fill="none" stroke="#789abc" stroke-width="3" cx="81.58" cy="-119.44" rx="27.65" ry="27.65"/><text text-anchor="middle" x="81.58" y="-112.54" font-family="fira code" font-size="28.00" fill="#789abc">x</text></g><!-- ---x --><g id="edge1" class="edge"><title>---x</title><path fill="none" stroke="#789abc" stroke-width="3" d="M108.27,-185.27C103.14,-172.8 96.95,-157.78 91.83,-145.34"/></g><!-- + --><g id="node3" class="node"><title>+</title><ellipse fill="none" stroke="#789abc" stroke-width="3" cx="191.58" cy="-119.44" rx="28.07" ry="28.07"/><text text-anchor="middle" x="191.58" y="-112.54" font-family="fira code" font-size="28.00" fill="#789abc">+</text></g><!-- ---+ --><g id="edge2" class="edge"><title>---+</title><path fill="none" stroke="#789abc" stroke-width="3" d="M135.51,-189.46C147.13,-175.15 162.52,-156.21 174.23,-141.79"/></g><!-- 3 --><g id="node4" class="node"><title>3</title><ellipse fill="none" stroke="#789abc" stroke-width="3" cx="27.58" cy="-27.58" rx="27.65" ry="27.65"/><text text-anchor="middle" x="27.58" y="-20.68" font-family="fira code" font-size="28.00" fill="#789abc">3</text></g><!-- x--3 --><g id="edge3" class="edge"><title>x--3</title><path fill="none" stroke="#789abc" stroke-width="3" d="M67.67,-95.3C59.61,-81.88 49.49,-65.04 41.44,-51.64"/></g><!-- 5 --><g id="node5" class="node"><title>5</title><ellipse fill="none" stroke="#789abc" stroke-width="3" cx="100.58" cy="-27.58" rx="27.65" ry="27.65"/><text text-anchor="middle" x="100.58" y="-20.68" font-family="fira code" font-size="28.00" fill="#789abc">5</text></g><!-- x--5 --><g id="edge4" class="edge"><title>x--5</title><path fill="none" stroke="#789abc" stroke-width="3" d="M87.18,-91.96C89.65,-80.26 92.55,-66.54 95.02,-54.86"/></g><!-- 2 --><g id="node6" class="node"><title>2</title><ellipse fill="none" stroke="#789abc" stroke-width="3" cx="173.58" cy="-27.58" rx="27.65" ry="27.65"/><text text-anchor="middle" x="173.58" y="-20.68" font-family="fira code" font-size="28.00" fill="#789abc">2</text></g><!-- +--2 --><g id="edge5" class="edge"><title>+--2</title><path fill="none" stroke="#789abc" stroke-width="3" d="M186.18,-91.48C183.86,-79.9 181.16,-66.41 178.85,-54.9"/></g><!-- 4 --><g id="node7" class="node"><title>4</title><ellipse fill="none" stroke="#789abc" stroke-width="3" cx="246.58" cy="-27.58" rx="27.65" ry="27.65"/><text text-anchor="middle" x="246.58" y="-20.68" font-family="fira code" font-size="28.00" fill="#789abc">4</text></g><!-- +--4 --><g id="edge6" class="edge"><title>+--4</title><path fill="none" stroke="#789abc" stroke-width="3" d="M206.03,-94.83C214.24,-81.41 224.47,-64.69 232.6,-51.41"/></g></g></svg>
<figcaption><b>Tree 1: Tree of Arithmetic Expressions</b></figcaption>
<span class="graphviz-light-dark" data-library-default="#789abc" data-default="#789abc" data-light="#000000" data-dark="#ffffff"></span><svg width="216pt" height="209pt" viewBox="0.00 0.00 216.00 208.85" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" class="graphviz dot"><g id="graph0" class="graph" transform="scale(0.43 0.43) rotate(0) translate(4 480.5)"><title>G</title><polygon fill="transparent" stroke="transparent" points="-4,4 -4,-480.5 497.08,-480.5 497.08,4 -4,4"/><!-- 5 --><g id="node1" class="node"><title>5</title><ellipse fill="none" stroke="#789abc" stroke-width="3" cx="271.04" cy="-452.46" rx="24.08" ry="24.08"/><text text-anchor="middle" x="271.04" y="-446.26" font-family="fira code" font-size="24.00" fill="#789abc">5</text></g><!-- 4 --><g id="node2" class="node"><title>4</title><ellipse fill="none" stroke="#789abc" stroke-width="3" cx="189.04" cy="-368.37" rx="24.08" ry="24.08"/><text text-anchor="middle" x="189.04" y="-362.17" font-family="fira code" font-size="24.00" fill="#789abc">4</text></g><!-- 5--4 --><g id="edge1" class="edge"><title>5--4</title><path fill="none" stroke="red" stroke-width="3" d="M254.45,-434.85C240.22,-420.61 219.83,-400.19 205.61,-385.96"/></g><!-- 32 --><g id="node3" class="node"><title>32</title><ellipse fill="none" stroke="#789abc" stroke-width="3" cx="389.04" cy="-368.37" rx="24.08" ry="24.08"/><text text-anchor="middle" x="389.04" y="-362.17" font-family="fira code" font-size="24.00" fill="#789abc">3</text></g><!-- 5--32 --><g id="edge2" class="edge"><title>5--32</title><path fill="none" stroke="red" stroke-width="3" d="M290.53,-437.9C312.39,-422.69 347.65,-398.17 369.53,-382.95"/></g><!-- 31 --><g id="node4" class="node"><title>31</title><ellipse fill="none" stroke="#789abc" stroke-width="3" cx="90.04" cy="-284.29" rx="24.08" ry="24.08"/><text text-anchor="middle" x="90.04" y="-278.09" font-family="fira code" font-size="24.00" fill="#789abc">3</text></g><!-- 4--31 --><g id="edge3" class="edge"><title>4--31</title><path fill="none" stroke="blue" stroke-width="3" d="M170.88,-352.32C153.02,-337.51 125.91,-315.03 108.08,-300.25"/></g><!-- 22 --><g id="node6" class="node"><title>22</title><ellipse fill="none" stroke="#789abc" stroke-width="3" cx="222.04" cy="-284.29" rx="24.08" ry="24.08"/><text text-anchor="middle" x="222.04" y="-278.09" font-family="fira code" font-size="24.00" fill="#789abc">2</text></g><!-- 4--22 --><g id="edge4" class="edge"><title>4--22</title><path fill="none" stroke="blue" stroke-width="3" d="M197.71,-345.81C202.52,-333.84 208.49,-318.99 213.31,-307"/></g><!-- 23 --><g id="node7" class="node"><title>23</title><ellipse fill="none" stroke="#789abc" stroke-width="3" cx="356.04" cy="-284.29" rx="24.08" ry="24.08"/><text text-anchor="middle" x="356.04" y="-278.09" font-family="fira code" font-size="24.00" fill="#789abc">2</text></g><!-- 32--23 --><g id="edge7" class="edge"><title>32--23</title><path fill="none" stroke="blue" stroke-width="3" d="M380.37,-345.81C375.56,-333.84 369.59,-318.99 364.77,-307"/></g><!-- 15 --><g id="node12" class="node"><title>15</title><ellipse fill="none" stroke="#789abc" stroke-width="3" cx="422.04" cy="-284.29" rx="24.08" ry="24.08"/><text text-anchor="middle" x="422.04" y="-278.09" font-family="fira code" font-size="24.00" fill="#789abc">1</text></g><!-- 32--15 --><g id="edge8" class="edge"><title>32--15</title><path fill="none" stroke="blue" stroke-width="3" d="M397.71,-345.81C402.52,-333.84 408.49,-318.99 413.31,-307"/></g><!-- 21 --><g id="node5" class="node"><title>21</title><ellipse fill="none" stroke="#789abc" stroke-width="3" cx="57.04" cy="-196.21" rx="24.08" ry="24.08"/><text text-anchor="middle" x="57.04" y="-190.01" font-family="fira code" font-size="24.00" fill="#789abc">2</text></g><!-- 31--21 --><g id="edge5" class="edge"><title>31--21</title><path fill="none" stroke="red" stroke-width="3" d="M81.71,-261.57C76.71,-248.52 70.37,-231.97 65.37,-218.92"/></g><!-- 12 --><g id="node9" class="node"><title>12</title><ellipse fill="none" stroke="#789abc" stroke-width="3" cx="123.04" cy="-196.21" rx="24.08" ry="24.08"/><text text-anchor="middle" x="123.04" y="-190.01" font-family="fira code" font-size="24.00" fill="#789abc">1</text></g><!-- 31--12 --><g id="edge6" class="edge"><title>31--12</title><path fill="none" stroke="red" stroke-width="3" d="M98.37,-261.57C103.37,-248.52 109.71,-231.97 114.72,-218.92"/></g><!-- 11 --><g id="node8" class="node"><title>11</title><ellipse fill="none" stroke="#789abc" stroke-width="3" cx="24.04" cy="-108.12" rx="24.08" ry="24.08"/><text text-anchor="middle" x="24.04" y="-101.92" font-family="fira code" font-size="24.00" fill="#789abc">1</text></g><!-- 21--11 --><g id="edge9" class="edge"><title>21--11</title><path fill="none" stroke="blue" stroke-width="3" d="M48.71,-173.49C43.71,-160.44 37.37,-143.89 32.37,-130.84"/></g><!-- 02 --><g id="node14" class="node"><title>02</title><ellipse fill="none" stroke="#789abc" stroke-width="3" cx="90.04" cy="-108.12" rx="24.08" ry="24.08"/><text text-anchor="middle" x="90.04" y="-101.92" font-family="fira code" font-size="24.00" fill="#789abc">0</text></g><!-- 21--02 --><g id="edge10" class="edge"><title>21--02</title><path fill="none" stroke="blue" stroke-width="3" d="M65.37,-173.49C70.37,-160.44 76.71,-143.89 81.72,-130.84"/></g><!-- 13 --><g id="node10" class="node"><title>13</title><ellipse fill="none" stroke="#789abc" stroke-width="3" cx="189.04" cy="-196.21" rx="24.08" ry="24.08"/><text text-anchor="middle" x="189.04" y="-190.01" font-family="fira code" font-size="24.00" fill="#789abc">1</text></g><!-- 22--13 --><g id="edge13" class="edge"><title>22--13</title><path fill="none" stroke="red" stroke-width="3" d="M213.71,-261.57C208.71,-248.52 202.37,-231.97 197.37,-218.92"/></g><!-- 05 --><g id="node17" class="node"><title>05</title><ellipse fill="none" stroke="#789abc" stroke-width="3" cx="255.04" cy="-196.21" rx="24.08" ry="24.08"/><text text-anchor="middle" x="255.04" y="-190.01" font-family="fira code" font-size="24.00" fill="#789abc">0</text></g><!-- 22--05 --><g id="edge14" class="edge"><title>22--05</title><path fill="none" stroke="red" stroke-width="3" d="M230.37,-261.57C235.37,-248.52 241.71,-231.97 246.72,-218.92"/></g><!-- 14 --><g id="node11" class="node"><title>14</title><ellipse fill="none" stroke="#789abc" stroke-width="3" cx="321.04" cy="-196.21" rx="24.08" ry="24.08"/><text text-anchor="middle" x="321.04" y="-190.01" font-family="fira code" font-size="24.00" fill="#789abc">1</text></g><!-- 23--14 --><g id="edge16" class="edge"><title>23--14</title><path fill="none" stroke="red" stroke-width="3" d="M347.21,-261.57C341.86,-248.42 335.07,-231.72 329.75,-218.63"/></g><!-- 07 --><g id="node19" class="node"><title>07</title><ellipse fill="none" stroke="#789abc" stroke-width="3" cx="391.04" cy="-196.21" rx="24.08" ry="24.08"/><ellipse fill="none" stroke="#789abc" stroke-width="3" cx="391.04" cy="-196.21" rx="28.08" ry="28.08"/><text text-anchor="middle" x="391.04" y="-190.01" font-family="fira code" font-size="24.00" fill="#789abc">0</text></g><!-- 23--07 --><g id="edge17" class="edge"><title>23--07</title><path fill="none" stroke="red" stroke-width="3" d="M364.87,-261.57C369.69,-249.71 375.69,-234.97 380.72,-222.59"/></g><!-- 01 --><g id="node13" class="node"><title>01</title><ellipse fill="none" stroke="#789abc" stroke-width="3" cx="24.04" cy="-24.04" rx="24.08" ry="24.08"/><text text-anchor="middle" x="24.04" y="-17.84" font-family="fira code" font-size="24.00" fill="#789abc">0</text></g><!-- 11--01 --><g id="edge11" class="edge"><title>11--01</title><path fill="none" stroke="red" stroke-width="3" d="M24.04,-83.82C24.04,-72.64 24.04,-59.27 24.04,-48.12"/></g><!-- 03 --><g id="node15" class="node"><title>03</title><ellipse fill="none" stroke="#789abc" stroke-width="3" cx="156.04" cy="-108.12" rx="24.08" ry="24.08"/><text text-anchor="middle" x="156.04" y="-101.92" font-family="fira code" font-size="24.00" fill="#789abc">0</text></g><!-- 12--03 --><g id="edge12" class="edge"><title>12--03</title><path fill="none" stroke="blue" stroke-width="3" d="M131.37,-173.49C136.37,-160.44 142.71,-143.89 147.72,-130.84"/></g><!-- 04 --><g id="node16" class="node"><title>04</title><ellipse fill="none" stroke="#789abc" stroke-width="3" cx="222.04" cy="-108.12" rx="24.08" ry="24.08"/><text text-anchor="middle" x="222.04" y="-101.92" font-family="fira code" font-size="24.00" fill="#789abc">0</text></g><!-- 13--04 --><g id="edge15" class="edge"><title>13--04</title><path fill="none" stroke="blue" stroke-width="3" d="M197.37,-173.49C202.37,-160.44 208.71,-143.89 213.72,-130.84"/></g><!-- 06 --><g id="node18" class="node"><title>06</title><ellipse fill="none" stroke="#789abc" stroke-width="3" cx="321.04" cy="-108.12" rx="24.08" ry="24.08"/><text text-anchor="middle" x="321.04" y="-101.92" font-family="fira code" font-size="24.00" fill="#789abc">0</text></g><!-- 14--06 --><g id="edge18" class="edge"><title>14--06</title><path fill="none" stroke="blue" stroke-width="3" d="M321.04,-172.14C321.04,-159.79 321.04,-144.62 321.04,-132.26"/></g><!-- 08 --><g id="node20" class="node"><title>08</title><ellipse fill="none" stroke="#789abc" stroke-width="3" cx="465.04" cy="-196.21" rx="24.08" ry="24.08"/><ellipse fill="none" stroke="#789abc" stroke-width="3" cx="465.04" cy="-196.21" rx="28.08" ry="28.08"/><text text-anchor="middle" x="465.04" y="-190.01" font-family="fira code" font-size="24.00" fill="#789abc">0</text></g><!-- 15--08 --><g id="edge19" class="edge"><title>15--08</title><path fill="none" stroke="red" stroke-width="3" d="M432.45,-262.45C438.61,-250.11 446.45,-234.42 452.9,-221.52"/></g></g></svg>
<figcaption><b>Tree 2: Game Tree (of Nim)</b></figcaption>
</center>
Undirected
Multi-graph (with loops)
Graphviz inside Admonitions¶
graphviz in UnExpanded Block
graphviz in Expanded Block