How to make DynamicMap adopt to yaxis range/limits change?

I’m not a interact user but using depends and by using framewise=True you can achieve it

import numpy as np; import panel as pn; import holoviews as hv; hv.extension('bokeh'); pn.extension();
r = np.arange(100*40).reshape([40,100])
sine = np.exp(-(r-2000)**2/2000)*np.sin(r)
curves = [[(il+ix)**3*sine for ix in range(50)] for il in range(50)]
s = pn.widgets.IntSlider(value=0, start=0, end=49, name='i')
@pn.depends(i=s)
def plot(i):
    mean = np.mean(curves[i][i],axis=0)
    return hv.Curve(mean)

pn.Column(s, hv.DynamicMap(plot).opts(framewise=True))

dmap

1 Like