Skip to content

Commit

Permalink
Added gifs for streams examples
Browse files Browse the repository at this point in the history
  • Loading branch information
philippjfr authored and jlstevens committed Jun 12, 2017
1 parent b41c844 commit 96d4424
Show file tree
Hide file tree
Showing 7 changed files with 59 additions and 31 deletions.
15 changes: 9 additions & 6 deletions examples/streams/bokeh/Bounds_Selection.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,7 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"metadata": {},
"outputs": [],
"source": [
"import numpy as np\n",
Expand All @@ -31,9 +29,7 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"metadata": {},
"outputs": [],
"source": [
"%%opts Histogram {+framewise}\n",
Expand Down Expand Up @@ -64,6 +60,13 @@
"# Combine components and display\n",
"points * mean_sel * bounds << yhist << xhist"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"<center><img src=\"http://assets.holoviews.org/gifs/bounds_selection.gif\" width=400></center>"
]
}
],
"metadata": {
Expand Down
15 changes: 9 additions & 6 deletions examples/streams/bokeh/HeatMap_Tap.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,7 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"metadata": {},
"outputs": [],
"source": [
"import numpy as np\n",
Expand All @@ -31,9 +29,7 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"metadata": {},
"outputs": [],
"source": [
"%%opts HeatMap [width=400 height=400 tools=['hover'] xrotation=90] Histogram [width=400 height=400] {+framewise}\n",
Expand All @@ -53,6 +49,13 @@
"\n",
"heatmap + hv.DynamicMap(tap_histogram, kdims=[], streams=[posxy])"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"<center><img src=\"http://assets.holoviews.org/gifs/heatmap_tap.gif\" width=600></center>"
]
}
],
"metadata": {
Expand Down
15 changes: 9 additions & 6 deletions examples/streams/bokeh/Linked_Pointer_Crosssection.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,7 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"metadata": {},
"outputs": [],
"source": [
"import numpy as np\n",
Expand All @@ -31,9 +29,7 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"metadata": {},
"outputs": [],
"source": [
"%%opts Curve [width=100]\n",
Expand All @@ -54,6 +50,13 @@
"# Combine images, vline and cross-sections\n",
"((img1 * vline) << crosssection1) + ((img2 * vline) << crosssection2)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"<center><img src=\"http://assets.holoviews.org/gifs/linked_pointer_crosssection.gif\" width=600></center>"
]
}
],
"metadata": {
Expand Down
11 changes: 8 additions & 3 deletions examples/streams/bokeh/Multiple_Selection.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true,
"scrolled": true
},
"outputs": [],
Expand All @@ -33,7 +32,6 @@
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true,
"scrolled": true
},
"outputs": [],
Expand All @@ -50,11 +48,18 @@
"\n",
"# Declare DynamicMaps to show mean y-value of selection as HLine\n",
"hline1 = hv.DynamicMap(lambda index: hv.HLine(points['y'][index].mean() if index else -10), streams=[sel1])\n",
"hline2 = hv.DynamicMap(lambda index: hv.HLine(points2['y'][index].mean() if index else -10), streams=[sel1])\n",
"hline2 = hv.DynamicMap(lambda index: hv.HLine(points2['y'][index].mean() if index else -10), streams=[sel2])\n",
"\n",
"# Combine points and dynamic HLines\n",
"points * points2 * hline1 * hline2"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"<center><img src=\"http://assets.holoviews.org/gifs/multiple_selection.gif\" width=350></center>"
]
}
],
"metadata": {
Expand Down
15 changes: 9 additions & 6 deletions examples/streams/bokeh/Point_Selection1D.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,7 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"metadata": {},
"outputs": [],
"source": [
"import numpy as np\n",
Expand All @@ -31,9 +29,7 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"metadata": {},
"outputs": [],
"source": [
"%%opts Points [tools=['box_select', 'lasso_select']]\n",
Expand All @@ -56,6 +52,13 @@
"# Combine points and DynamicMap\n",
"points + hv.DynamicMap(selected_info, streams=[selection])"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"<center><img src=\"http://assets.holoviews.org/gifs/point_selection1d.gif\" width=600></center>"
]
}
],
"metadata": {
Expand Down
12 changes: 8 additions & 4 deletions examples/streams/bokeh/Pointer_Crosshair.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true,
"scrolled": true
},
"outputs": [],
Expand All @@ -32,9 +31,7 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"metadata": {},
"outputs": [],
"source": [
"Y,X=(np.mgrid[0:100, 0:100]-50.)/20.\n",
Expand All @@ -51,6 +48,13 @@
"# Overlay image and cross_hair_info\n",
"img * hv.DynamicMap(cross_hair_info, streams=[pointer])"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"<center><img src=\"http://assets.holoviews.org/gifs/pointer_crosshair.gif\" width=300></center>"
]
}
],
"metadata": {
Expand Down
7 changes: 7 additions & 0 deletions examples/streams/bokeh/Range_Histogram.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,13 @@
"# Adjoin the dynamic histogram computed based on the current ranges\n",
"img << hv.DynamicMap(selected_hist, streams=[rangexy])"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"<center><img src=\"http://assets.holoviews.org/gifs/range_histogram.gif\" width=400></center>"
]
}
],
"metadata": {
Expand Down

0 comments on commit 96d4424

Please sign in to comment.