File size: 860 Bytes
1e74a9c
 
cc5b5d9
1e74a9c
cc5b5d9
1e74a9c
 
cc5b5d9
1e74a9c
cc5b5d9
1e74a9c
 
 
 
cc5b5d9
1e74a9c
cc5b5d9
1e74a9c
cc5b5d9
1e74a9c
 
cc5b5d9
1e74a9c
 
cc5b5d9
 
1e74a9c
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
import hvplot.pandas
import holoviews as hv
import panel as pn
from bokeh.sampledata.iris import flowers

pn.extension(sizing_mode="stretch_width")
hv.extension("bokeh")

accent_color = "#ff286e"

scatter = flowers.hvplot.scatter(
    x="sepal_length", y="sepal_width", c=accent_color, responsive=True, height=350
)
hist = flowers.hvplot.hist("petal_width", c=accent_color, responsive=True, height=350)

scatter.opts(size=10)

selection_linker = hv.selection.link_selections.instance()

scatter = selection_linker(scatter)
hist = selection_linker(hist)

scatter.opts(tools=["hover"], active_tools=["box_select"])
hist.opts(tools=["hover"], active_tools=["box_select"])

pn.template.FastListTemplate(
    site="Awesome Panel and HoloViews",
    title="Cross Filtering/ Linked Brushing",
    header_background=accent_color,
    main=[scatter, hist],
).servable()