|
|
@@ -0,0 +1,103 @@
|
|
|
+{
|
|
|
+ "cells": [
|
|
|
+ {
|
|
|
+ "cell_type": "code",
|
|
|
+ "execution_count": 8,
|
|
|
+ "metadata": {
|
|
|
+ "scrolled": true
|
|
|
+ },
|
|
|
+ "outputs": [
|
|
|
+ {
|
|
|
+ "data": {
|
|
|
+ "image/svg+xml": [
|
|
|
+ "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>\r\n",
|
|
|
+ "<!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\"\r\n",
|
|
|
+ " \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\">\r\n",
|
|
|
+ "<!-- Generated by graphviz version 2.38.0 (20140413.2041)\r\n",
|
|
|
+ " -->\r\n",
|
|
|
+ "<!-- Title: %3 Pages: 1 -->\r\n",
|
|
|
+ "<svg width=\"269pt\" height=\"204pt\"\r\n",
|
|
|
+ " viewBox=\"0.00 0.00 268.98 204.00\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">\r\n",
|
|
|
+ "<g id=\"graph0\" class=\"graph\" transform=\"scale(1 1) rotate(0) translate(4 200)\">\r\n",
|
|
|
+ "<title>%3</title>\r\n",
|
|
|
+ "<polygon fill=\"white\" stroke=\"none\" points=\"-4,4 -4,-200 264.984,-200 264.984,4 -4,4\"/>\r\n",
|
|
|
+ "<!-- A -->\r\n",
|
|
|
+ "<g id=\"node1\" class=\"node\"><title>A</title>\r\n",
|
|
|
+ "<ellipse fill=\"none\" stroke=\"black\" cx=\"179.992\" cy=\"-178\" rx=\"53.8905\" ry=\"18\"/>\r\n",
|
|
|
+ "<text text-anchor=\"middle\" x=\"179.992\" y=\"-174.3\" font-family=\"Times New Roman,serif\" font-size=\"14.00\">King Arthur</text>\r\n",
|
|
|
+ "</g>\r\n",
|
|
|
+ "<!-- B -->\r\n",
|
|
|
+ "<g id=\"node2\" class=\"node\"><title>B</title>\r\n",
|
|
|
+ "<ellipse fill=\"none\" stroke=\"black\" cx=\"90.9919\" cy=\"-105\" rx=\"90.9839\" ry=\"18\"/>\r\n",
|
|
|
+ "<text text-anchor=\"middle\" x=\"90.9919\" y=\"-101.3\" font-family=\"Times New Roman,serif\" font-size=\"14.00\">Sir Bedevere the Wise</text>\r\n",
|
|
|
+ "</g>\r\n",
|
|
|
+ "<!-- A->B -->\r\n",
|
|
|
+ "<g id=\"edge1\" class=\"edge\"><title>A->B</title>\r\n",
|
|
|
+ "<path fill=\"none\" stroke=\"black\" d=\"M160.24,-161.243C148.365,-151.77 133.043,-139.547 119.832,-129.007\"/>\r\n",
|
|
|
+ "<polygon fill=\"black\" stroke=\"black\" points=\"121.929,-126.203 111.929,-122.702 117.563,-131.675 121.929,-126.203\"/>\r\n",
|
|
|
+ "</g>\r\n",
|
|
|
+ "<!-- L -->\r\n",
|
|
|
+ "<g id=\"node3\" class=\"node\"><title>L</title>\r\n",
|
|
|
+ "<ellipse fill=\"none\" stroke=\"black\" cx=\"169.992\" cy=\"-18\" rx=\"90.9839\" ry=\"18\"/>\r\n",
|
|
|
+ "<text text-anchor=\"middle\" x=\"169.992\" y=\"-14.3\" font-family=\"Times New Roman,serif\" font-size=\"14.00\">Sir Lancelot the Brave</text>\r\n",
|
|
|
+ "</g>\r\n",
|
|
|
+ "<!-- A->L -->\r\n",
|
|
|
+ "<g id=\"edge2\" class=\"edge\"><title>A->L</title>\r\n",
|
|
|
+ "<path fill=\"none\" stroke=\"black\" d=\"M184.456,-159.626C186.927,-149.107 189.744,-135.375 190.992,-123 192.597,-107.081 193.379,-102.821 190.992,-87 188.889,-73.0645 184.491,-58.0477 180.261,-45.6797\"/>\r\n",
|
|
|
+ "<polygon fill=\"black\" stroke=\"black\" points=\"183.461,-44.2348 176.801,-35.9954 176.869,-46.59 183.461,-44.2348\"/>\r\n",
|
|
|
+ "</g>\r\n",
|
|
|
+ "<!-- B->L -->\r\n",
|
|
|
+ "<g id=\"edge3\" class=\"edge\"><title>B->L</title>\r\n",
|
|
|
+ "<path fill=\"none\" stroke=\"black\" d=\"M106.6,-87.2067C118.286,-74.6335 134.44,-57.252 147.516,-43.1825\"/>\r\n",
|
|
|
+ "<polygon fill=\"black\" stroke=\"black\" points=\"150.172,-45.466 154.416,-35.7584 145.045,-40.7005 150.172,-45.466\"/>\r\n",
|
|
|
+ "<text text-anchor=\"middle\" x=\"148.992\" y=\"-57.8\" font-family=\"Times New Roman,serif\" font-size=\"14.00\">false</text>\r\n",
|
|
|
+ "</g>\r\n",
|
|
|
+ "</g>\r\n",
|
|
|
+ "</svg>\r\n"
|
|
|
+ ],
|
|
|
+ "text/plain": [
|
|
|
+ "<graphviz.dot.Digraph at 0x28d45fe8588>"
|
|
|
+ ]
|
|
|
+ },
|
|
|
+ "execution_count": 8,
|
|
|
+ "metadata": {},
|
|
|
+ "output_type": "execute_result"
|
|
|
+ }
|
|
|
+ ],
|
|
|
+ "source": [
|
|
|
+ "from graphviz import Digraph\n",
|
|
|
+ "\n",
|
|
|
+ "dot = Digraph(comment='The Round Table')\n",
|
|
|
+ "\n",
|
|
|
+ "dot.node('A', 'King Arthur', {'shape':''})\n",
|
|
|
+ "dot.node('B', 'Sir Bedevere the Wise')\n",
|
|
|
+ "dot.node('L', 'Sir Lancelot the Brave')\n",
|
|
|
+ "dot.edges(['AB', 'AL'])\n",
|
|
|
+ "dot.edge('B', 'L', 'false')\n",
|
|
|
+ "\n",
|
|
|
+ "dot"
|
|
|
+ ]
|
|
|
+ }
|
|
|
+ ],
|
|
|
+ "metadata": {
|
|
|
+ "kernelspec": {
|
|
|
+ "display_name": "Python 3",
|
|
|
+ "language": "python",
|
|
|
+ "name": "python3"
|
|
|
+ },
|
|
|
+ "language_info": {
|
|
|
+ "codemirror_mode": {
|
|
|
+ "name": "ipython",
|
|
|
+ "version": 3
|
|
|
+ },
|
|
|
+ "file_extension": ".py",
|
|
|
+ "mimetype": "text/x-python",
|
|
|
+ "name": "python",
|
|
|
+ "nbconvert_exporter": "python",
|
|
|
+ "pygments_lexer": "ipython3",
|
|
|
+ "version": "3.6.8"
|
|
|
+ }
|
|
|
+ },
|
|
|
+ "nbformat": 4,
|
|
|
+ "nbformat_minor": 2
|
|
|
+}
|