Resizable plots in column

I’m trying to do interactive size change of plot and parameter ‘resizable’ looks almost what i needed, but it turns out that it doesn’t work with column layout. Like, i can change width, but height is locked or something like this. Don’t know if it’s a bug or natural behavior.

from bokeh.layouts import row, column
from bokeh.plotting import figure, show

x = list(range(11))
y0 = x
y1 = [10 - i for i in x]
y2 = [abs(i - 5) for i in x]

s1 = figure(width=250, height=350, background_fill_color="#fafafa",
            resizable='height'), y0, size=12, color="#53777a", alpha=0.8)

s2 = figure(width=250, height=250, background_fill_color="#fafafa",
            x_range=s1.x_range, resizable='both')
s2.triangle(x, y1, size=12, color="#c02942", alpha=0.8)

show(column(children=[s1, s2], resizable='both', height_policy='max'))

Also, wanna ask how can i do something like this.

At present, the sizing_mode properties are the most-used and best-supported mechanism for controlling plot layout. I’d suggest starting with those, instead of resizable

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.