Skip to content

Commit fac53dd

Browse files
add svg to notebook and gitignore
1 parent 683cd42 commit fac53dd

2 files changed

Lines changed: 57 additions & 24 deletions

File tree

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,7 @@ cython_debug/
137137
# Project specific
138138
*.tex
139139
*.pdf
140+
*.svg
140141
# Ignore PNGs by default, but allow PNGs in the repository `img/` directory
141142
*.png
142143
!/img/*.png

tutorial/draw_ef.ipynb

Lines changed: 56 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,17 @@
22
"cells": [
33
{
44
"cell_type": "code",
5-
"execution_count": 12,
5+
"execution_count": 1,
66
"id": "162e2935",
77
"metadata": {},
88
"outputs": [],
99
"source": [
10-
"from draw_tree import draw_tree, generate_tex, generate_pdf, generate_png"
10+
"from draw_tree import draw_tree, generate_tex, generate_pdf, generate_png, generate_svg"
1111
]
1212
},
1313
{
1414
"cell_type": "code",
15-
"execution_count": 13,
15+
"execution_count": 2,
1616
"id": "55aebb9a-ac08-4e8b-9c60-b85274881d9f",
1717
"metadata": {},
1818
"outputs": [
@@ -356,7 +356,7 @@
356356
"<IPython.core.display.SVG object>"
357357
]
358358
},
359-
"execution_count": 13,
359+
"execution_count": 2,
360360
"metadata": {},
361361
"output_type": "execute_result"
362362
}
@@ -367,7 +367,7 @@
367367
},
368368
{
369369
"cell_type": "code",
370-
"execution_count": 14,
370+
"execution_count": 3,
371371
"id": "584e6cdc",
372372
"metadata": {},
373373
"outputs": [
@@ -492,7 +492,7 @@
492492
"<IPython.core.display.SVG object>"
493493
]
494494
},
495-
"execution_count": 14,
495+
"execution_count": 3,
496496
"metadata": {},
497497
"output_type": "execute_result"
498498
}
@@ -503,7 +503,7 @@
503503
},
504504
{
505505
"cell_type": "code",
506-
"execution_count": 15,
506+
"execution_count": 4,
507507
"id": "f6160e69",
508508
"metadata": {},
509509
"outputs": [
@@ -779,7 +779,7 @@
779779
"<IPython.core.display.SVG object>"
780780
]
781781
},
782-
"execution_count": 15,
782+
"execution_count": 4,
783783
"metadata": {},
784784
"output_type": "execute_result"
785785
}
@@ -790,7 +790,7 @@
790790
},
791791
{
792792
"cell_type": "code",
793-
"execution_count": 16,
793+
"execution_count": 5,
794794
"id": "22534773",
795795
"metadata": {},
796796
"outputs": [
@@ -1009,7 +1009,7 @@
10091009
"<IPython.core.display.SVG object>"
10101010
]
10111011
},
1012-
"execution_count": 16,
1012+
"execution_count": 5,
10131013
"metadata": {},
10141014
"output_type": "execute_result"
10151015
}
@@ -1020,7 +1020,7 @@
10201020
},
10211021
{
10221022
"cell_type": "code",
1023-
"execution_count": 17,
1023+
"execution_count": 6,
10241024
"id": "23d9ad2e",
10251025
"metadata": {},
10261026
"outputs": [
@@ -1169,7 +1169,7 @@
11691169
"<IPython.core.display.SVG object>"
11701170
]
11711171
},
1172-
"execution_count": 17,
1172+
"execution_count": 6,
11731173
"metadata": {},
11741174
"output_type": "execute_result"
11751175
}
@@ -1180,7 +1180,7 @@
11801180
},
11811181
{
11821182
"cell_type": "code",
1183-
"execution_count": 18,
1183+
"execution_count": 7,
11841184
"id": "cc060d85",
11851185
"metadata": {},
11861186
"outputs": [
@@ -1324,7 +1324,7 @@
13241324
"<IPython.core.display.SVG object>"
13251325
]
13261326
},
1327-
"execution_count": 18,
1327+
"execution_count": 7,
13281328
"metadata": {},
13291329
"output_type": "execute_result"
13301330
}
@@ -1335,7 +1335,7 @@
13351335
},
13361336
{
13371337
"cell_type": "code",
1338-
"execution_count": 19,
1338+
"execution_count": 8,
13391339
"id": "168a43f8-8609-4610-9cdd-474a8086bcc0",
13401340
"metadata": {},
13411341
"outputs": [
@@ -1345,7 +1345,7 @@
13451345
"'/Users/echalstrey/projects/draw_tree/tutorial/x1.tex'"
13461346
]
13471347
},
1348-
"execution_count": 19,
1348+
"execution_count": 8,
13491349
"metadata": {},
13501350
"output_type": "execute_result"
13511351
}
@@ -1356,7 +1356,7 @@
13561356
},
13571357
{
13581358
"cell_type": "code",
1359-
"execution_count": 22,
1359+
"execution_count": 9,
13601360
"id": "acef45b1-1e1d-40b4-94f5-fabad7bb902a",
13611361
"metadata": {},
13621362
"outputs": [
@@ -1366,7 +1366,7 @@
13661366
"'/Users/echalstrey/projects/draw_tree/tutorial/custom.tex'"
13671367
]
13681368
},
1369-
"execution_count": 22,
1369+
"execution_count": 9,
13701370
"metadata": {},
13711371
"output_type": "execute_result"
13721372
}
@@ -1377,7 +1377,7 @@
13771377
},
13781378
{
13791379
"cell_type": "code",
1380-
"execution_count": 20,
1380+
"execution_count": 10,
13811381
"id": "82ea8094-3438-4b2c-9a76-c757e1680cda",
13821382
"metadata": {},
13831383
"outputs": [
@@ -1387,7 +1387,7 @@
13871387
"'/Users/echalstrey/projects/draw_tree/tutorial/x1.pdf'"
13881388
]
13891389
},
1390-
"execution_count": 20,
1390+
"execution_count": 10,
13911391
"metadata": {},
13921392
"output_type": "execute_result"
13931393
}
@@ -1398,18 +1398,50 @@
13981398
},
13991399
{
14001400
"cell_type": "code",
1401-
"execution_count": 21,
1401+
"execution_count": 11,
14021402
"id": "fa1ae230-0ee2-4a2b-9fe1-e766898fc0a6",
14031403
"metadata": {},
1404-
"outputs": [],
1404+
"outputs": [
1405+
{
1406+
"data": {
1407+
"text/plain": [
1408+
"'/Users/echalstrey/projects/draw_tree/tutorial/x1.png'"
1409+
]
1410+
},
1411+
"execution_count": 11,
1412+
"metadata": {},
1413+
"output_type": "execute_result"
1414+
}
1415+
],
1416+
"source": [
1417+
"generate_png('../games/x1.ef')"
1418+
]
1419+
},
1420+
{
1421+
"cell_type": "code",
1422+
"execution_count": 2,
1423+
"id": "b08d9255",
1424+
"metadata": {},
1425+
"outputs": [
1426+
{
1427+
"data": {
1428+
"text/plain": [
1429+
"'/Users/echalstrey/projects/draw_tree/tutorial/x1.svg'"
1430+
]
1431+
},
1432+
"execution_count": 2,
1433+
"metadata": {},
1434+
"output_type": "execute_result"
1435+
}
1436+
],
14051437
"source": [
1406-
"# generate_png('../games/x1.ef')"
1438+
"generate_svg(\"../games/x1.ef\")"
14071439
]
14081440
}
14091441
],
14101442
"metadata": {
14111443
"kernelspec": {
1412-
"display_name": "Python 3 (ipykernel)",
1444+
"display_name": "gambitvenv313",
14131445
"language": "python",
14141446
"name": "python3"
14151447
},

0 commit comments

Comments
 (0)