1

I have here a very simplified example:

plot = []
for d in range(2):
    name=str(d)
    data = pd.DataFrame({'x':[2,5,1], 'y':[3,1,6], 'm':[1,2,3]})
    x = hv.Curve(data, 'm', 'x', label=name)
    y = hv.Curve(data, 'm', 'y', label=name)
    uu = hv.Layout(x+y).cols(1)
    plot.append(uu)

hv.Layout(plot).opts(tabs = True)

The result is a number of plots in separated tabs (4 plots in 4 tabs). However, I wish to get two plots as in here

hv.Layout(x+y).cols(1)

combined with a layout in tabs (each tab contains two plots in one column).

Thanks

Sander van den Oord
  • 10,986
  • 5
  • 51
  • 96
mati
  • 1,093
  • 4
  • 12
  • 18

1 Answers1

1

I don't know if this can also be done directly within HoloViews, but using pn.Tabs() is a quick solution:

import panel as pn
pn.extension()

pn.Tabs(('plot 0', plot[0]), ('plot 1', plot[1]))
Sander van den Oord
  • 10,986
  • 5
  • 51
  • 96