Reactive functions, depends decorator, and non-widget function arguments

Hello! I’m trying to hook up a quadmesh plot to two different sliders. Drawing my quadmesh also has an additional argument that does not come from a widget. From reading the docs I’m not sure if I can do this using the panel.depends decorator – all the examples decorate a function with exactly the same number of arguments as the decorator.

Maybe I need to use parameterized classes for this? I want something like this:

@pn.depends(slider_one.param.value, slider_two.param.value):
def draw_my_quadmesh(slider_one, slider_two, other_thing):
    # make a quadmesh using slider_one, slider_two, and other_thing

The problem is that the function is invoked dynamically by Panel (or HoloViews) itself so where would the other_thing come from?

ok… Maybe I should back up to avoid the XY problem. My data have five dimensions: X, Y, Z, time, model run. I’d like to show three side-by-side quadmeshes. Each quadmesh on coordinates X, Y. The three quadmeshes show three different model runs. Two sliders control Z and time. All three quadmeshes respond to the same pair of (Z, time) sliders.

I’ve been able to show the three quadmeshes, each with its own pair of sliders (so, six sliders total). And I can get three identical quadmeshes to respond to the same pair of sliders.

I have not been able to make the three quad meshes vary on some piece of information (here the model run) that is not controlled by a widget.

Thanks for reading :slight_smile: