Skip to content

Commit b84e493

Browse files
committed
Day 24, part two: Tweak the Graph generated by the Kotlin Notebook a bit
* Use a more pleasant font * Use smaller arrows and a lighter arrow type * Commit the generated .svg file so that one doesn't have to install Graphviz just to take a look at the output
1 parent 2108f2f commit b84e493

File tree

3 files changed

+4763
-8
lines changed

3 files changed

+4763
-8
lines changed

src/main/kotlin/de/ronny_h/aoc/year24/day24/PlotCrossedWires.ipynb

Lines changed: 19 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@
1717
{
1818
"metadata": {
1919
"ExecuteTime": {
20-
"end_time": "2025-06-19T15:02:31.995940700Z",
21-
"start_time": "2025-06-19T15:02:31.823908Z"
20+
"end_time": "2025-06-19T15:50:24.279065300Z",
21+
"start_time": "2025-06-19T15:50:24.119250200Z"
2222
}
2323
},
2424
"cell_type": "code",
@@ -42,8 +42,8 @@
4242
{
4343
"metadata": {
4444
"ExecuteTime": {
45-
"end_time": "2025-06-19T15:02:32.853145900Z",
46-
"start_time": "2025-06-19T15:02:32.001943800Z"
45+
"end_time": "2025-06-19T15:50:25.272229100Z",
46+
"start_time": "2025-06-19T15:50:24.295155300Z"
4747
}
4848
},
4949
"cell_type": "code",
@@ -74,8 +74,8 @@
7474
{
7575
"metadata": {
7676
"ExecuteTime": {
77-
"end_time": "2025-06-19T15:02:33.181162100Z",
78-
"start_time": "2025-06-19T15:02:32.861150Z"
77+
"end_time": "2025-06-19T15:50:25.779627800Z",
78+
"start_time": "2025-06-19T15:50:25.282871300Z"
7979
}
8080
},
8181
"cell_type": "code",
@@ -126,8 +126,8 @@
126126
{
127127
"metadata": {
128128
"ExecuteTime": {
129-
"end_time": "2025-06-19T15:02:33.970587700Z",
130-
"start_time": "2025-06-19T15:02:33.192162900Z"
129+
"end_time": "2025-06-19T15:50:26.593631900Z",
130+
"start_time": "2025-06-19T15:50:25.793419900Z"
131131
}
132132
},
133133
"cell_type": "code",
@@ -136,6 +136,8 @@
136136
"\n",
137137
"File(\"wiredGates.dot\").printWriter().use { out ->\n",
138138
" out.println(\"digraph {\")\n",
139+
" out.println(\" edge [arrowhead=vee arrowsize=0.6]\")\n",
140+
" out.println(\" node [fontname=Arial shape=plain]\")\n",
139141
" val gatesCount = gatesWithId.size\n",
140142
" val outWires = gatesWithId.filter { gatesInLookup[it.out] == null }.map { it.out }\n",
141143
" val inXColor = \"\\\"#4A88D4\\\"\"\n",
@@ -168,6 +170,15 @@
168170
],
169171
"outputs": [],
170172
"execution_count": 4
173+
},
174+
{
175+
"metadata": {},
176+
"cell_type": "markdown",
177+
"source": [
178+
"The resulting graph looks like this:\n",
179+
"\n",
180+
"![A Graph showing the wired gates with inputs and outputs](./wiredGates.svg)"
181+
]
171182
}
172183
],
173184
"metadata": {

src/main/kotlin/de/ronny_h/aoc/year24/day24/wiredGates.dot

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
digraph {
2+
edge [arrowhead=vee arrowsize=0.6]
3+
node [fontname=Arial shape=plain]
24
222 [label=x00 fontcolor="#4A88D4" color="#4A88D4"]
35
223 [label=x01 fontcolor="#4A88D4" color="#4A88D4"]
46
224 [label=x02 fontcolor="#4A88D4" color="#4A88D4"]

0 commit comments

Comments
 (0)