holoviz / holoviews

With Holoviews, your data visualizes itself.
https://holoviews.org
BSD 3-Clause "New" or "Revised" License
2.7k stars 404 forks source link

Box Zoom keeps hanging #5847

Open peterroelants opened 1 year ago

peterroelants commented 1 year ago

Description of expected behavior and the observed behavior

Box Zoom box does not dissapear with linked datashader plots. It does not dissapear when a box is drawn as expected.

I only observed this behaviour when upgrading holoviews and bokeh to the most recent version. I haven't had this issue with holoviews 1.15 and bokeh<3.

Complete, minimal, self-contained example code that reproduces the issue

import numpy as np
import xarray as xr

import bokeh
import bokeh.models
import holoviews as hv
from holoviews.operation.datashader import rasterize
hv.extension('bokeh')

x_size = 10_000
y_size = 10_000
data = xr.DataArray(
    np.random.rand(x_size, y_size) * 1000,
    dims=['x', 'y'],
    coords={'x': np.linspace(0, 1, x_size), 'y': np.linspace(0, 100, y_size)},
)

mesh_01 = hv.QuadMesh(data, kdims=['x', 'y'], vdims=['z'])
mesh_01_rasterized = rasterize(mesh_01).opts(
    title="mesh_01",
    width=800, height=400,
)

mesh_02 = hv.QuadMesh(data, kdims=['x', 'y'], vdims=['z'])
mesh_02_rasterized = rasterize(mesh_01).opts(
    title="mesh_02",
    width=800, height=400,
)

(
    (mesh_01_rasterized + mesh_02_rasterized)
).cols(1).opts(
    title="Compare samples"
)

Screenshots or screencasts of the bug in action

https://github.com/holoviz/holoviews/assets/951093/ee839d58-7ca8-43b3-810c-488542e25130

ALL software version info

Python implementation: CPython
Python version       : 3.11.4
IPython version      : 8.14.0

xarray   : 2023.7.0
bokeh    : 3.2.1
numpy    : 1.24.4
holoviews: 1.17.0

VSCode 1.81.0
hoxbro commented 1 year ago

Can recreate in VSCode.