Hi,
I am dynamically generating DynamicMaps plots inside a Parametrized class method, like this:
def create_nolay_plot(self, ind, associated_plots, streams):
def make_f(self, indic):
def f(x_range, y_range):
return hv.Curve(self.data_df).opts(**indic.plot_opts)
return f
f_dyn = make_f(ind)
dp = hv.DynamicMap(f_dyn, streams=streams).opts(responsive=True,
xticks=30, active_tools=["wheel_zoom"],
show_grid=True)
I’d like to be able to add @pn.depends() to the f
function, but as it is not a class method, I don’t know how to do.
What I want :
def create_nolay_plot(self, ind, associated_plots, streams):
def make_f(self, indic):
@pn.depends("interval")
def f(x_range, y_range):
return hv.Curve(self.data_df).opts(**indic.plot_opts)
return f
Thanks !