glue-jupyter icon indicating copy to clipboard operation
glue-jupyter copied to clipboard

3D scatter viewer broken

Open astrofrog opened this issue 1 year ago • 4 comments

The 3D scatter viewer is no longer showing any points for me, and also shows an additional panel between the visualization and the regular glue viewer and layer options:

image

@maartenbreddels - before I dig too far into this, are you aware of any changes in ipyvolume recently that might have caused this?

astrofrog avatar May 17 '24 11:05 astrofrog

To hide the side panel we need https://github.com/widgetti/ipyvolume/pull/442

astrofrog avatar May 17 '24 12:05 astrofrog

I think we shouldn't see the side panel at all, we should just take a ipyvolume figure.

Not sure why the scatter does not work. https://py.cafe/maartenbreddels/ipyvolume-3d-vector-field seems to work fine.

maartenbreddels avatar Jul 25 '24 14:07 maartenbreddels

@maartenbreddels It must be something in how the scatter is wired up to the glue viewer (though I haven't really had time to investigate), as Azmé and I have made ipyvolume scatters that work, but then the same data won't display in glue.

Carifio24 avatar Jul 25 '24 14:07 Carifio24

@astrofrog @maartenbreddels I figured out the basic issue here . It looks like trying to make a plot where one of the x/y/z components has an underlying numpy array whose data type isn't a float won't work. And it seems to fail in a way that breaks updating the scatter widget, as changing the offending component to something that's floats doesn't fix things

As an example see this gist. The original W5 data won't show, but if I create a new data object with non-float components removed, it renders fine. I'm not sure whether this is an ipyvolume issue (some sort of bad serialization?) or whether we need to do some astype-ing in the layer artist.

Carifio24 avatar Jul 25 '24 19:07 Carifio24