Multiple Widgets as parameters for a function that returns a dataset for hvplot

I am trying to create an app with multiple sliders that affect the dataset that is plotted using hvplot interactively. Here is a step by step reproducible example where using sample_data from xarray we create two range sliders that are used to define a mask for the dataset. The dataset is then plotted using hvplot. I have tried @pn.depends, pn.bind, hvplot.bind and to try and return an .interactive xarray.Dataset` that is plotted. Realistically I will do this with 4 masks and 6 variables but I am not even sure how to get this working with the Panel building blocks.

import xarray as xr
import numpy as np
import panel as pn
import hvplot.xarray

xd = xr.tutorial.open_dataset('eraint_uvz')
rsu = pn.widgets.RangeSlider(
    name="U Slider",
rsv = pn.widgets.RangeSlider(
    name="V Slider",
pn.Column( rsu , rsv )
xd['u_masked'] = xr.where((xd.u > rsu.value[0]) & (xd.u < rsu.value[1]) & (xd.v > rsv.value[0]) & (xd.v < rsv.value[1]), 1, np.nan)
out_plot = xd.u_masked.sel(level=200,month=1).hvplot()
pn.Column( out_plot )

Hey @StuckDuckF, just to follow up on that, did you figure this out?

Not yet sir. I am having trouble hooking everything together as to make it interactive. HvPlot does not like it when I pass an array dataset with more than two dimensions and is not interactive from a function. So I essentially have to .sel all the coordinates then .where some globally defined widgets then add a .interactive to the return dataset so I have something that works but it limits what I actually want to do. I can’t load datasets dynamically etc. Do you have anything I can reference to get this done?