import holoviews as hv
from holoviews import opts
from bokeh.sampledata.iris import flowers
from holoviews.operation import gridmatrix
hv.extension('bokeh')
If the first 2 cells are executed and a selection on table is performed, sel1 as expected returns the selected index or indices. If the third cell is executed, and a selection in one of the gridmatrix’s plots is performed, sel2 doesn’t return any index or indices.
I’m not quite following here; the source for sel2 isn’t the gridmatrix, it’s the table, so it wouldn’t be affected by making a selection on the gridmatrix. Are you asking how to set up a selection where the source is the gridmatrix?
I’m confused. In your code, the selection works fine on the standalone table. It also works fine when the table is alongside a GridMatrix in a Layout, as long as shared_datasource=False. But once shared_datasource=True, Selection1D(source=table) doesn’t ever contain anything, nor does Selection1D(source=grid), whether I’m selecting on the grid or the table. Somehow the grid is interfering with Selection1D? Maybe @philippjfr can explain.