bqplot-image-gl icon indicating copy to clipboard operation
bqplot-image-gl copied to clipboard

bqplot figure does display in Accordion

Open swelborn opened this issue 3 years ago • 1 comments

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 avatar Jan 23 '22 22:01 swelborn

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?

swelborn avatar Jan 24 '22 00:01 swelborn