You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Python version : 3.10.8 (tags/v3.10.8:aaaf517, Oct 11 2022, 16:50:30) [MSC v.1933 64 bit (AMD64)]
IPython version : (not installed)
Tornado version : 6.2
Bokeh version : 2.4.3/3.1.0
node.js version : v16.15.0
npm version : 8.5.5
Operating system : Windows-10-10.0.19045-SP0
Browser name and version
No response
Jupyter notebook / Jupyter Lab version
No response
Expected behavior
Using stretch_width or scale_width should not collapse figures.
Observed behavior
Starting with version 3.0 (also present in the latest version) figures may collapse if stretch_width or scale_width are used for the sizing_mode. Note: This can also be observed in the documentation: https://docs.bokeh.org/en/latest/docs/user_guide/basic/layouts.html#multiple-objects
In case of stretch_width the collapsed layout also stretches in the height direction which is rather weird.
2.4.3 Scale width
2.4.3 Stretch width
3.1.0 Scale width
3.1.0 Stretch width
Example code
importnumpyasnpfrombokeh.ioimportcurdocfrombokeh.layoutsimportcolumn, rowfrombokeh.modelsimportColumnDataSource, Slider, TextInputfrombokeh.plottingimportfigure# Set up plotplot=figure(title="my sine wave",
tools="crosshair,pan,reset,save,wheel_zoom",
x_range=[0, 4*np.pi], y_range=[-2.5, 2.5], sizing_mode="stretch_width")
# Set up widgetstext=TextInput(title="title", value='my sine wave')
offset=Slider(title="offset", value=0.0, start=-5.0, end=5.0, step=0.1)
amplitude=Slider(title="amplitude", value=1.0, start=-5.0, end=5.0, step=0.1)
phase=Slider(title="phase", value=0.0, start=0.0, end=2*np.pi)
freq=Slider(title="frequency", value=1.0, start=0.1, end=5.1, step=0.1)
# Set up layouts and add to documentinputs=column(text, offset, amplitude, phase, freq)
curdoc().add_root(row(inputs, plot))
curdoc().title="Sliders"
Stack traceback or browser console output
No response
Screenshots
No response
The text was updated successfully, but these errors were encountered:
The general advice is to make sure that sizing modes are assigned top down. One can use new "inherit" sizing mode in inner layouts to inherit the sizing mode from its parent. However, we will probably consider this a regression. Previously layout would infer from its children whether it should expand or not. The new layout introduced in bokeh 3.0 doesn't do that.
Software versions
Python version : 3.10.8 (tags/v3.10.8:aaaf517, Oct 11 2022, 16:50:30) [MSC v.1933 64 bit (AMD64)]
IPython version : (not installed)
Tornado version : 6.2
Bokeh version : 2.4.3/3.1.0
node.js version : v16.15.0
npm version : 8.5.5
Operating system : Windows-10-10.0.19045-SP0
Browser name and version
No response
Jupyter notebook / Jupyter Lab version
No response
Expected behavior
Using
stretch_width
orscale_width
should not collapse figures.Observed behavior
Starting with version 3.0 (also present in the latest version) figures may collapse if
stretch_width
orscale_width
are used for thesizing_mode
. Note: This can also be observed in the documentation: https://docs.bokeh.org/en/latest/docs/user_guide/basic/layouts.html#multiple-objectsIn case of
stretch_width
the collapsed layout also stretches in the height direction which is rather weird.2.4.3 Scale width
2.4.3 Stretch width
3.1.0 Scale width
3.1.0 Stretch width
Example code
Stack traceback or browser console output
No response
Screenshots
No response
The text was updated successfully, but these errors were encountered: