diff --git a/examples/homepage.ipynb b/examples/homepage.ipynb index aef8b36f42..e2c9704a54 100644 --- a/examples/homepage.ipynb +++ b/examples/homepage.ipynb @@ -65,17 +65,24 @@ "\"\"\")\n", "\n", "code = pn.widgets.CodeEditor(language='python', theme='monokai', height=360, value=\\\n", - "\"\"\"x = pn.widgets.Select(name='x', options=cols)\n", + "\"\"\"import panel as pn\n", + "\n", + "pn.extension()\n", + "\n", + "x = pn.widgets.Select(name='x', options=cols)\n", "y = pn.widgets.Select(name='y', options=cols, value='bill_depth_mm')\n", "n_clusters = pn.widgets.IntSlider(name='n_clusters', start=2, end=5, value=3)\n", + "\n", "explanation = pn.pane.Markdown(...)\n", "\n", - "def plot_clusters(x, y, n_clusters):\n", + "def plot(x, y, n_clusters):\n", " ...\n", " \n", + "interactive_plot = pn.bind(plot, x, y, n_clusters)\n", + " \n", "pn.Row(\n", " pn.WidgetBox(x, y, n_clusters, explanation), \n", - " pn.bind(plot, x, y, n_clusters)\n", + " interactive_plot\n", ")\"\"\", width=800)\n", "\n", "app = pn.Tabs(\n",