Skip to content

Commit

Permalink
Add extra cells to notebook
Browse files Browse the repository at this point in the history
  • Loading branch information
lnay committed Mar 10, 2024
1 parent c0b454d commit b7374fb
Showing 1 changed file with 60 additions and 10 deletions.
70 changes: 60 additions & 10 deletions working_files/notebook.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,8 @@
" 0 2 4 5"
]
},
"execution_count": 1,
"metadata": {},
"output_type": "execute_result"
"output_type": "display_data"
}
],
"source": [
Expand All @@ -33,9 +32,8 @@
" 0 4 8 10"
]
},
"execution_count": 2,
"metadata": {},
"output_type": "execute_result"
"output_type": "display_data"
}
],
"source": [
Expand Down Expand Up @@ -94,9 +92,8 @@
"Catlab.Graphics.Graphviz.Graph(\"G\", true, \"neato\", Catlab.Graphics.Graphviz.Statement[Catlab.Graphics.Graphviz.Node(\"n1\", OrderedCollections.OrderedDict{Symbol, Union{String, Catlab.Graphics.Graphviz.Html}}(:label => \"V\")), Catlab.Graphics.Graphviz.Node(\"n2\", OrderedCollections.OrderedDict{Symbol, Union{String, Catlab.Graphics.Graphviz.Html}}(:label => \"E\")), Catlab.Graphics.Graphviz.Edge(Catlab.Graphics.Graphviz.NodeID[Catlab.Graphics.Graphviz.NodeID(\"n2\", \"\", \"\"), Catlab.Graphics.Graphviz.NodeID(\"n1\", \"\", \"\")], OrderedCollections.OrderedDict{Symbol, Union{String, Catlab.Graphics.Graphviz.Html}}(:label => \"src\")), Catlab.Graphics.Graphviz.Edge(Catlab.Graphics.Graphviz.NodeID[Catlab.Graphics.Graphviz.NodeID(\"n2\", \"\", \"\"), Catlab.Graphics.Graphviz.NodeID(\"n1\", \"\", \"\")], OrderedCollections.OrderedDict{Symbol, Union{String, Catlab.Graphics.Graphviz.Html}}(:label => \"tgt\"))], OrderedCollections.OrderedDict{Symbol, Union{String, Catlab.Graphics.Graphviz.Html}}(), OrderedCollections.OrderedDict{Symbol, Union{String, Catlab.Graphics.Graphviz.Html}}(:margin => \"0\", :shape => \"ellipse\"), OrderedCollections.OrderedDict{Symbol, Union{String, Catlab.Graphics.Graphviz.Html}}())"
]
},
"execution_count": 3,
"metadata": {},
"output_type": "execute_result"
"output_type": "display_data"
}
],
"source": [
Expand All @@ -113,14 +110,67 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 4,
"metadata": {},
"outputs": [],
"source": []
"outputs": [
{
"data": {
"image/svg+xml": [
"<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>\n",
"<!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\"\n",
" \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\">\n",
"<!-- Generated by graphviz version 2.43.0 (0)\n",
" -->\n",
"<!-- Title: G Pages: 1 -->\n",
"<svg width=\"96pt\" height=\"34pt\"\n",
" viewBox=\"0.00 0.00 96.43 33.61\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">\n",
"<g id=\"graph0\" class=\"graph\" transform=\"scale(1 1) rotate(0) translate(4 29.61)\">\n",
"<title>G</title>\n",
"<polygon fill=\"white\" stroke=\"transparent\" points=\"-4,4 -4,-29.61 92.43,-29.61 92.43,4 -4,4\"/>\n",
"<!-- n1 -->\n",
"<g id=\"node1\" class=\"node\">\n",
"<title>n1</title>\n",
"<ellipse fill=\"none\" stroke=\"black\" cx=\"10.61\" cy=\"-10.61\" rx=\"10.71\" ry=\"10.71\"/>\n",
"<text text-anchor=\"middle\" x=\"10.61\" y=\"-6.91\" font-family=\"Times,serif\" font-size=\"14.00\">1</text>\n",
"</g>\n",
"<!-- n2 -->\n",
"<g id=\"node2\" class=\"node\">\n",
"<title>n2</title>\n",
"<ellipse fill=\"none\" stroke=\"black\" cx=\"77.82\" cy=\"-10.61\" rx=\"10.71\" ry=\"10.71\"/>\n",
"<text text-anchor=\"middle\" x=\"77.82\" y=\"-6.91\" font-family=\"Times,serif\" font-size=\"14.00\">2</text>\n",
"</g>\n",
"<!-- n1&#45;&gt;n2 -->\n",
"<g id=\"edge1\" class=\"edge\">\n",
"<title>n1&#45;&gt;n2</title>\n",
"<path fill=\"none\" stroke=\"black\" d=\"M21.23,-10.61C32.02,-10.61 49.64,-10.61 62.14,-10.61\"/>\n",
"<polygon fill=\"black\" stroke=\"black\" points=\"62.16,-12.36 67.16,-10.61 62.16,-8.86 62.16,-12.36\"/>\n",
"<text text-anchor=\"middle\" x=\"44.21\" y=\"-14.41\" font-family=\"Times,serif\" font-size=\"14.00\">1</text>\n",
"</g>\n",
"</g>\n",
"</svg>\n"
],
"text/plain": [
"Catlab.Graphics.Graphviz.Graph(\"G\", true, \"dot\", Catlab.Graphics.Graphviz.Statement[Catlab.Graphics.Graphviz.Node(\"n1\", OrderedCollections.OrderedDict{Symbol, Union{String, Catlab.Graphics.Graphviz.Html}}(:label => \"1\")), Catlab.Graphics.Graphviz.Node(\"n2\", OrderedCollections.OrderedDict{Symbol, Union{String, Catlab.Graphics.Graphviz.Html}}(:label => \"2\")), Catlab.Graphics.Graphviz.Edge(Catlab.Graphics.Graphviz.NodeID[Catlab.Graphics.Graphviz.NodeID(\"n1\", \"\", \"\"), Catlab.Graphics.Graphviz.NodeID(\"n2\", \"\", \"\")], OrderedCollections.OrderedDict{Symbol, Union{String, Catlab.Graphics.Graphviz.Html}}(:label => \"1\"))], OrderedCollections.OrderedDict{Symbol, Union{String, Catlab.Graphics.Graphviz.Html}}(:rankdir => \"LR\"), OrderedCollections.OrderedDict{Symbol, Union{String, Catlab.Graphics.Graphviz.Html}}(:height => \"0.05\", :margin => \"0\", :shape => \"circle\", :width => \"0.05\"), OrderedCollections.OrderedDict{Symbol, Union{String, Catlab.Graphics.Graphviz.Html}}(:arrowsize => \"0.5\"))"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"e = @acset Graph begin\n",
" V = 2\n",
" E = 1\n",
" src = [1]\n",
" tgt = [2]\n",
"end\n",
"\n",
"draw(e)"
]
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 5,
"metadata": {},
"outputs": [],
"source": []
Expand Down

0 comments on commit b7374fb

Please sign in to comment.