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
Description of expected behavior and the observed behavior
Cannot ensure that image aspect is preserved in a Panel app. In the code below, the first 2 images are displayed correctly (there is a warning that explains why responsive is ignored). The third one fills all remaining space in the browser, silently ignoring data_aspect=1.
Complete, minimal, self-contained example code that reproduces the issue
import panel as pn
import numpy as np
import xarray as xr
import hvplot.xarray
a = np.array([[1, 0, 1], [0, 1, 0]])
da = xr.DataArray(a, name='a')
plt1 = da.hvplot.image(frame_width=800, data_aspect=1)
plt2 = da.hvplot.image(frame_width=800, data_aspect=1, responsive=True)
plt3 = da.hvplot.image(data_aspect=1, responsive=True)
pn.Column(plt1, plt2, plt3).servable()
panel serve mean_extent.py --autoreload
2024-02-20 19:46:18,938 Starting Bokeh server version 3.3.4 (running on Tornado 6.3.3)
2024-02-20 19:46:18,938 User authentication hooks NOT provided (default user enabled)
2024-02-20 19:46:18,939 Bokeh app running at: http://localhost:5006/bar
2024-02-20 19:46:18,939 Starting Bokeh server with process id: 518955
2024-02-20 19:46:35,709 WebSocket connection opened
2024-02-20 19:46:35,709 ServerConnection created
. . .
WARNING:param.RasterPlot01994: responsive mode could not be enabled because fixed width and aspect were specified.
2024-02-20 20:18:21,995 responsive mode could not be enabled because fixed width and aspect were specified.
2024-02-20 20:18:22,055 W-1005 (FIXED_SIZING_MODE): 'fixed' sizing mode requires width and height to be set: figure(id='p2154', ...)
2024-02-20 20:18:22,055 W-1005 (FIXED_SIZING_MODE): 'fixed' sizing mode requires width and height to be set: figure(id='p2095', ...)
Screenshots or screencasts of the bug in action
I may be interested in making a pull request to address this
The text was updated successfully, but these errors were encountered:
It definitely looks the same. Is there a work-around? Aspect is pretty
important when rendering maps. @mattpap did not sound optimistic in his
reply to #5054.
Le mer. 21 févr. 2024, à 09 h 07, Simon Høxbro Hansen <
***@***.***> a écrit :
ALL software version info
Description of expected behavior and the observed behavior
Cannot ensure that image aspect is preserved in a Panel app. In the code below, the first 2 images are displayed correctly (there is a warning that explains why
responsive
is ignored). The third one fills all remaining space in the browser, silently ignoringdata_aspect=1
.Complete, minimal, self-contained example code that reproduces the issue
Stack traceback and/or browser JavaScript console output
Screenshots or screencasts of the bug in action
The text was updated successfully, but these errors were encountered: