Selection1d¶
Download this notebook from GitHub (right-click to download).
In [1]:
import numpy as np
import holoviews as hv
from holoviews import opts
from holoviews import streams
hv.extension('bokeh')
In [2]:
ndoverlay = hv.NdOverlay({i: hv.Curve(np.arange(10)*i) for i in range(5)})
selection = streams.Selection1D(source=ndoverlay)
dmap = hv.DynamicMap(lambda index: ndoverlay[index] if index else ndoverlay.clone(),
kdims=[], streams=[selection])
layout = ndoverlay + dmap
layout.opts(
opts.Curve(tools=['tap'], line_width=10),
opts.NdOverlay(legend_limit=0))
Out[2]:
Download this notebook from GitHub (right-click to download).