import panel as pn pn.extension() from bokeh.plotting import figure p1 = figure(width=300, height=300, name='Scatter') p1.scatter([0, 1, 2, 3, 4, 5, 6], [0, 1, 2, 3, 2, 1, 0]) p2 = figure(width=300, height=300, name='Line') p2.line([0, 1, 2, 3, 4, 5, 6], [0, 1, 2, 3, 2, 1, 0]) tabs = pn.Tabs(('Scatter', p1), p2) tabs p3 = figure(width=300, height=300, name='Square') p3.square([0, 1, 2, 3, 4, 5, 6], [0, 1, 2, 3, 2, 1, 0], size=10) tabs.append(p3) tabs print(tabs.active) tabs.active = 0 tabs = pn.Tabs(p1, p2, p3) tabs tabs = pn.Tabs( ('red', pn.Spacer(background='red', width=100, height=100)), ('blue', pn.Spacer(background='blue', width=100, height=100)), ('green', pn.Spacer(background='green', width=100, height=100))) tabs pn.Row(tabs, tabs.clone(active=1, tabs_location='right'), tabs.clone(active=2, tabs_location='below'), tabs.clone(tabs_location='left'))