How to update mutliple dynspread / spread plots simultaneously when interacting with them (zooming in/out)?

Hi,

I am using holoviews version 1.15 and datashader version 0.13

When I plot 2 datashades based on dynspread / spread functions, only the one I zoom in/out updates. I would like the other one to update too. Is that possible with the current version ?

here is a sample code from Working with large data doc:

np.random.seed(3)
kdims=['d1','d2']
num_ks=8

def random_cov():
    """Random covariance for use in generating 2D Gaussian distributions"""
    A = np.random.randn(2,2)
    return np.dot(A, A.T)

def rand_gauss2d(value=0, n=100000):
    """Return a randomly shaped 2D Gaussian distribution with an associated numeric value"""
    g = 100*np.random.multivariate_normal(np.random.randn(2), random_cov(), (n,))
    return np.hstack((g,value*np.ones((g.shape[0],1))))

gaussians = {i: hv.Points(rand_gauss2d(i), kdims, "i") for i in range(num_ks)}
c = dynspread(datashade(hv.NdOverlay(gaussians, kdims='k'), aggregator=ds.by('k', ds.count())))
m = dynspread(datashade(hv.NdOverlay(gaussians, kdims='k'), aggregator=ds.by('k', ds.mean("i"))))

c.opts(width=400) + m.opts(width=400)

Thanks !

I think this is the same bug as mentioned here.

For now, try to downgrade to 1.14.9

1 Like

Thank you @Hoxbro, you’re right, the bug came with version 1.15 as mentioned in the issue.

1.15.1 is recently released and seems to have fixed the issue for me.

1 Like