kopia lustrzana https://github.com/anitagraser/ogd-at-lab
Confirmed pn.interact works in updated environment
rodzic
790a116acf
commit
bf18adc249
|
@ -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"
|
||||
},
|
||||
|
|
Ładowanie…
Reference in New Issue