Skip to content

Commit 44b34cc

Browse files
committed
Fix Notebooks
Signed-off-by: martinRenou <[email protected]>
1 parent 2f1dac0 commit 44b34cc

File tree

2 files changed

+15
-4
lines changed

2 files changed

+15
-4
lines changed

examples/binary_image.ipynb

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,8 +122,19 @@
122122
"\n",
123123
"play.observe(on_update, 'value')\n",
124124
"\n",
125+
"# This is to prevent the Canvas to take the entire available space in the VBox\n",
126+
"canvas.layout.width = str(canvas.width) + 'px'\n",
127+
"canvas.layout.height = str(canvas.height) + 'px'\n",
128+
"\n",
125129
"VBox((canvas, HBox((play, progress))))"
126130
]
131+
},
132+
{
133+
"cell_type": "code",
134+
"execution_count": null,
135+
"metadata": {},
136+
"outputs": [],
137+
"source": []
127138
}
128139
],
129140
"metadata": {
@@ -142,7 +153,7 @@
142153
"name": "python",
143154
"nbconvert_exporter": "python",
144155
"pygments_lexer": "ipython3",
145-
"version": "3.8.1"
156+
"version": "3.8.5"
146157
}
147158
},
148159
"nbformat": 4,

examples/conways_game_of_life.ipynb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
"\n",
2626
"import numpy as np\n",
2727
"\n",
28-
"from ipycanvas import SketchyCanvas, hold_canvas"
28+
"from ipycanvas import RoughCanvas, hold_canvas"
2929
]
3030
},
3131
{
@@ -99,7 +99,7 @@
9999
"source": [
100100
"n_pixels = 15\n",
101101
"\n",
102-
"canvas = SketchyCanvas(width=x.shape[1]*n_pixels, height=x.shape[0]*n_pixels)\n",
102+
"canvas = RoughCanvas(width=x.shape[1]*n_pixels, height=x.shape[0]*n_pixels)\n",
103103
"canvas.fill_style = '#FFF0C9'\n",
104104
"canvas.stroke_style = 'white'\n",
105105
"canvas.fill_rect(0, 0, canvas.size[0], canvas.size[1])\n",
@@ -155,7 +155,7 @@
155155
"name": "python",
156156
"nbconvert_exporter": "python",
157157
"pygments_lexer": "ipython3",
158-
"version": "3.8.3"
158+
"version": "3.8.5"
159159
}
160160
},
161161
"nbformat": 4,

0 commit comments

Comments
 (0)