Commit f17f7ae1 authored by Matthieu Boileau's avatar Matthieu Boileau
Browse files

ot: add slide bar to histogram

parent a5fe594d
......@@ -37,7 +37,7 @@
"%matplotlib inline\n",
"from matplotlib import rcParams\n",
"from matplotlib import pyplot as plt\n",
"from ipywidgets import interact, fixed, FloatSlider\n",
"from ipywidgets import interact, fixed, FloatSlider, IntSlider\n",
"rcParams['figure.figsize'] = (8., 6.) # Enlarge figure\n",
"rcParams['animation.html'] = 'html5' # to render animation in notebook\n",
"# A slider for p\n",
......@@ -119,8 +119,7 @@
},
"outputs": [],
"source": [
"em2D_2000 = EarthMovers2D(2000)\n",
"em2D_2000.plot_distance_histogram(bins=20)"
"interact(em2D_2000.plot_distance_histogram, p=slider, bins=fixed(30));"
]
},
{
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment