We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent acd2ea2 commit a0755e1Copy full SHA for a0755e1
chapter03_notebook/03_widgets.ipynb
@@ -345,7 +345,10 @@
345
"source": [
346
"@button.on_click\n",
347
"def plot_on_click(b):\n",
348
- " plot2()"
+ " out.clear_output(wait=True)\n",
349
+ " with out:\n",
350
+ " plot2()\n",
351
+ " plt.show()"
352
]
353
},
354
{
@@ -385,10 +388,11 @@
385
388
}
386
389
],
387
390
391
+ "out = widgets.Output()\n",
392
"tab = widgets.Tab(children=[tab1, tab2])\n",
393
"tab.set_title(0, 'plot')\n",
394
"tab.set_title(1, 'styling')\n",
- "VBox(children=[tab, button])"
395
+ "VBox(children=[tab, button, out])"
396
397
398
0 commit comments