Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Images overlap plots in GridSpec #4268

Closed
droumis opened this issue Jan 10, 2023 · 1 comment · Fixed by #4514
Closed

Images overlap plots in GridSpec #4268

droumis opened this issue Jan 10, 2023 · 1 comment · Fixed by #4514
Milestone

Comments

@droumis
Copy link
Member

droumis commented Jan 10, 2023

ALL software version info

panel v0.14.2

Description of expected behavior and the observed behavior

When plotting an image after a plot in a GridSpec, the image overlaps with the plot. I would have expected that the images would be stretched to fit into their assigned grid cells. Using sizing_mode='stretch_both' makes it worse.

Complete, minimal, self-contained example code that reproduces the issue

import panel as pn
from bokeh.plotting import figure

p1 = figure(width=300, height=300)
p1.line([1, 2, 3], [1, 2, 3])

gridspec = pn.GridSpec()

gridspec[1, 0:2] = p1

gridspec[0, 0:2] = 'https://upload.wikimedia.org/wikipedia/commons/4/47/PNG_transparency_demonstration_1.png'

gridspec

image

Using sizing_mode='stretch_both':

image

@droumis droumis added the TRIAGE Default label for untriaged issues label Jan 10, 2023
@philippjfr philippjfr added this to the v1.0.0 milestone Jan 10, 2023
@philippjfr
Copy link
Member

This is a known issue (although I can't find the earlier issue about this) and is related to the bokeh layout engine. This should be resolved automatically once we upgrade to Bokeh 3.0 with the new layout engine.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants