holoviews
holoviews copied to clipboard
Datashade fails to update all figures on zoom.
The issue I've encountered involves the failure of the holoviews datashade method to correctly update multi-plot displays upon zoom.
I am using:
Python 3.9.13 holoviews 1.15.0 jupyterlab 3.4.4 bokeh 2.4.3 datashader 0.14.1 jupyter_bokeh 3.0.4 pyviz-comms 2.2.0
extensions are: @bokeh/jupyter_bokeh v3.0.4 enabled OK @pyviz/jupyterlab_pyviz v2.0 enabled OK
For simplicity, the example I am using is adapted from a former datashader issue.
import numpy as np
np.random.seed(42)
import holoviews as hv
from holoviews.operation.datashader import datashade
from holoviews import opts, dim
hv.extension('bokeh')
from colorcet import fire
datashade.cmap=fire[50:]
def gaussians(specs=[(1.5,0,1.0),(-1.5,0,1.0)],num=100):
"""
A concatenated list of points taken from 2D Gaussian distributions.
Each distribution is specified as a tuple (x,y,s), where x,y is the mean
and s is the standard deviation. Defaults to two horizontally
offset unit-mean Gaussians.
"""
np.random.seed(1)
dists = [(np.random.normal(x,s,num), np.random.normal(y,s,num)) for x,y,s in specs]
return np.hstack([d[0] for d in dists]), np.hstack([d[1] for d in dists])
dist = gaussians(specs=[(2,2,0.02), (2,-2,0.1), (-2,-2,0.5), (-2,2,1.0), (0,0,3)], num=10000000)
datashade(hv.Points(dist)) + datashade(hv.Points(dist))
When the code above is executed two holoviews figures are shown side-by-side. When the box-zoom tool or wheel zoom tool is used the zoom level changes for both figures. However, only the plot for which the cursor is over updates correctly. Curiously, this issue is not observed after downgrading to holoviews: 1.14.9. For this reason, I have posted this issue here.
Same as #5381, this is because of changes made in #5265.
@Hoxbro and @philippjfr , is this issue still applicable? If so it seems urgent to fix.
Should have been resolved in 1.15.1
Yes, it has been resolved.
https://user-images.githubusercontent.com/19758978/197961974-1b86b46c-dc63-4c86-a853-f671e2ab77f2.mp4