☰Read-only archive⌕
Looking for help with Bokeh?

This is a read-only archive. Ask questions and join the conversation on GitHub.

Visit Community Support on GitHub →
Archived discussions · Captured October 28, 2026

Panel sizing issue in 3.0.1

Community Support
paul_c
paul_c

Hi, I have been using code like this to produce panels of charts.

charts_1 = gridplot([[ch_1, ch_2, ch_3], [ch_4, ch_5, ch_6]], sizing_mode='stretch_both', merge_tools=False)
charts_2 = gridplot([[ch_7, ch_8], [ch_9, ch_10]], sizing_mode='stretch_both', merge_tools=False)

tab1 = TabPanel(child=(layout(column(charts_1), sizing_mode='stretch_both')),title="tab1")
tab2 = TabPanel(child=(layout(column(charts_2), sizing_mode='stretch_both')),title="tab2")

tabs = Tabs(tabs=[ tab1, tab2])

Previously, the panels would fill the screen. But after upgrading to 3.0.1, the chart sizes have drastically shrunk, as the screenshot shows. Has something changed in the new version that would explain this? Thanks

⌁   Link to post
paul_c
paul_c

Thanks. Here is a MRE:

import numpy as np
import pandas as pd
from bokeh.models import ColumnDataSource
from bokeh.plotting import figure
from bokeh.layouts import gridplot, column, row, layout
from bokeh.io import show, output_notebook
from bokeh.models import TabPanel, Tabs
#from bokeh.models.widgets import Tabs, Panel

output_notebook()

dates = pd.date_range("20210101", periods=6)
df_1 = pd.DataFrame(np.random.randn(6, 4), index=dates, columns=list("ABCD"))
df_1.rename_axis('Date', axis=0, inplace=True)
source = ColumnDataSource(df_1)

s1 = figure()
s1.line(x='Date',
        y='A',
        source = source,
        color='green')

s2 = figure()
s2.line(x='Date',
        y='A',
        source = source,
        color='green')

s3 = figure()
s3.line(x='Date',
        y='A',
        source = source,
        color='green')

s4 = figure()
s4.line(x='Date',
        y='A',
        source = source,
        color='green')

grid_one = gridplot([[s1,s2], [s3,s4]], sizing_mode='stretch_both', merge_tools=False)
grid_two = gridplot([[s1,s2], [s3,s4]], sizing_mode='stretch_both', merge_tools=False)

tab1 = TabPanel(child=(layout(column(grid_one), sizing_mode='stretch_both')), title="Grid One")
tab2 = TabPanel(child=(layout(column(grid_two), sizing_mode='stretch_both')), title="Grid Two")
    

tabs = Tabs(tabs=[ tab1, tab2 ], css_classes=['custom_tab']) 

show(tabs)
⌁   Link to post

End of archived discussion · Replies are disabled