Confirmed pn.interact works in updated environment

pull/2/head
anitagraser 2021-09-08 22:02:30 +02:00
rodzic 790a116acf
commit bf18adc249
1 zmienionych plików z 5 dodań i 14 usunięć

Wyświetl plik

@ -155,9 +155,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"## Interactive Trajectory Generalization Application\n",
"\n",
"This demo uses pn.interact() which may not work in Jupyter Lab. Use Jupyter Notebook instead if the application does not update when you change the input parameters. "
"## Interactive Trajectory Generalization Application"
]
},
{
@ -182,9 +180,9 @@
" else:\n",
" generalized = mpd.MinDistanceGeneralizer(traj).generalize(tolerance=tolerance)\n",
" generalized.add_speed(overwrite=True)\n",
" return ( generalized.hvplot(title='Speed along trajectory', c='speed', cmap='Viridis', colorbar=True, clim=(0,20), line_width=10, width=500, height=400) + \n",
" generalized.df['speed'].hvplot.hist(title='Speed histogram', width=300, height=450) \n",
" )"
" map_plot = generalized.hvplot(title='Speed along trajectory', c='speed', cmap='Viridis', colorbar=True, clim=(0,20), line_width=10, width=500, height=400)\n",
" hist_plot = generalized.df.hvplot.hist('speed', title='Speed histogram', width=300, height=400) \n",
" return (map_plot + hist_plot)"
]
},
{
@ -197,18 +195,11 @@
"kw = dict(traj=traj, tolerance=(0, 1000), generalizer=['DouglasPeuckerGeneralizer', 'MinDistanceGeneralizer'])\n",
"pn.interact(my_plot, **kw)"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"display_name": "Python 3 (ipykernel)",
"language": "python",
"name": "python3"
},