Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes for user guides #4027

Merged
merged 1 commit into from
Oct 4, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions examples/user_guide/15-Large_Data.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,12 @@
"metadata": {},
"outputs": [],
"source": [
"import datashader as ds\n",
"import numpy as np\n",
"import holoviews as hv\n",
"\n",
"from holoviews import opts\n",
"import datashader as ds\n",
"\n",
"from holoviews.operation.datashader import datashade, shade, dynspread, rasterize\n",
"from holoviews.operation import decimate\n",
"\n",
Expand Down Expand Up @@ -486,7 +488,7 @@
"rasterizable = [hv.RGB(np.dstack([r,g,b])), hv.HSV(np.dstack([g,b,r]))]\n",
"\n",
"hv.Layout([dynspread(datashade(e.relabel(e.__class__.name))) for e in shadeable] + \n",
" [ rasterize(e.relabel(e.__class__.name)) for e in rasterizable]).cols(6)"
" [ rasterize(e.relabel(e.__class__.name)) for e in rasterizable]).opts(shared_axes=False).cols(6)"
]
},
{
Expand Down Expand Up @@ -583,5 +585,5 @@
}
},
"nbformat": 4,
"nbformat_minor": 2
"nbformat_minor": 4
}
10 changes: 5 additions & 5 deletions examples/user_guide/17-Dashboards.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
"def load_symbol(symbol, variable='adj_close', **kwargs):\n",
" df = pd.DataFrame(getattr(stocks, symbol))\n",
" df['date'] = df.date.astype('datetime64[ns]')\n",
" return hv.Curve(df, ('date', 'Date'), variable)\n",
" return hv.Curve(df, ('date', 'Date'), variable).opts(framewise=True)\n",
"\n",
"stock_symbols = ['AAPL', 'IBM', 'FB', 'GOOG', 'MSFT']\n",
"dmap = hv.DynamicMap(load_symbol, kdims='Symbol').redim.values(Symbol=stock_symbols)\n",
Expand Down Expand Up @@ -100,7 +100,7 @@
"\n",
"stock_dmap = hv.DynamicMap(explorer.load_symbol)\n",
"\n",
"pn.Row(explorer.param, stock_dmap)"
"pn.Row(pn.panel(explorer.param, parameters=['symbol', 'variable']), stock_dmap)"
]
},
{
Expand Down Expand Up @@ -153,9 +153,9 @@
"\n",
"dmap = hv.DynamicMap(load_symbol_cb)\n",
"\n",
"smoothed = rolling(stock_dmap, rolling_window=rolling_window.param.value)\n",
"smoothed = rolling(dmap, rolling_window=rolling_window.param.value)\n",
"\n",
"pn.Row(pn.WidgetBox('## Stock Explorer', symbol, variable, rolling_window), smoothed.opts(width=500))"
"pn.Row(pn.WidgetBox('## Stock Explorer', symbol, variable, rolling_window), smoothed.opts(width=500, framewise=True))"
]
},
{
Expand Down Expand Up @@ -226,5 +226,5 @@
}
},
"nbformat": 4,
"nbformat_minor": 2
"nbformat_minor": 4
}