Is there a better way to get the holomap's widget and use it elsewhere?

import xarray as xr
import panel as pn

ds = xr.tutorial.open_dataset('air_temperature')
plot, widget = pn.Row(ds.hvplot('lon', 'lat'))[0]  # this line specifically seems unintuitive
pn.Column(plot, pn.WidgetBox(pn.Row(widget, pn.widgets.StaticText(value='Example Text'))))

Hi @ahuang11

I don’t think so, but I don’t know for sure.

My thoughts: You should be able to find out by inspecting what panel.pane.Holoviews does to get the widgets. And as far as I can see that is pretty complicated. And thus I don’t believe there is an “easy” way.


But I think it would be a fair feature request to have a method that makes sense or have it documented what the best practice for using Panel to layout the widgets of a Holoviews object is.

I think one solution is just using a keyword arg:
image, select = ds.hvplot('lon', 'lat', widgets={'time':pn.widgets.Select})