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

bqplot figure does display in Accordion #79

Open
swelborn opened this issue Jan 23, 2022 · 1 comment
Open

bqplot figure does display in Accordion #79

swelborn opened this issue Jan 23, 2022 · 1 comment
Labels
bug Something isn't working

Comments

@swelborn
Copy link

Describe the bug
ImageGL mark for a bqplot.Figure does not appear in ipywidgets.Accordion container. You can see it outside of the container, but not inside. I am using the beta version of ipywidgets v8.

To Reproduce
Using the basic example script:

from ipywidgets import *
import numpy as np
from bqplot import Figure, LinearScale, Axis, ColorScale
from bqplot_image_gl import ImageGL
scale_x = LinearScale(min=0, max=1)
scale_y = LinearScale(min=0, max=1)
scales = {'x': scale_x,
          'y': scale_y}
axis_x = Axis(scale=scale_x, label='x')
axis_y = Axis(scale=scale_y, label='y', orientation='vertical')

figure = Figure(scales=scales, axes=[axis_x, axis_y])

scales_image = {'x': scale_x,
                'y': scale_y,
                'image': ColorScale(min=0, max=1)}

image = ImageGL(image=np.random.random((10, 10)), scales=scales_image)

figure.marks = (image,)
figure
Accordion(children=[figure])

Here is my environment:
environment.txt

@swelborn swelborn added the bug Something isn't working label Jan 23, 2022
@swelborn
Copy link
Author

swelborn commented Jan 24, 2022

After searching for about 2 hours on this issue, I found that if I did a ctrl + scroll (resizing browser magnification) after making the accordion, that the figure would show up. I'm using brave. This doesn't seem to happen in MS edge.

Update: it does, in fact, happen in MS edge.

Is there a property that I can set so that I don't need to do this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant