Hello,
I am trying to create a 2D raster plot which expands to fill the available space but maintains square pixels. I believe match_aspect = True for figure should do this and it seems to work until the figure is included in row/col. Here is my example:
import numpy as np
from bokeh.plotting import figure, show
from bokeh.layouts import column, row
from bokeh.models import WheelZoomTool
from scipy import misc
img = misc.face(gray=True)
p = figure(width=400, height=400, tools=['wheel_zoom'], sizing_mode="scale_both", match_aspect = True)
p.toolbar.active_scroll = p.select_one(WheelZoomTool)
p.image(image=[img], x=0, y=0, dw=img.shape[0], dh=img.shape[1],palette= 'Cividis256')
#show(p)
show(row(column(p,height_policy='max', width_policy='max'),height_policy='max', width_policy='max'))
If you run this, zoom in with the wheel zoom and then resize the browser window, the face is distorted. Without the row/col, match_aspect works but with row/col the face is distorted when the browser window is resized.
I struggle to get complex layouts to resize and fill the desired space so I don’t know if this is a bug or not… I’d appreciate any suggestions anyone might have (and also some feedback on whether this seems like a bug or not).
Thanks in advance for any help… I’m using Bokeh 3.2.1


