Skip to content

Conversation

Carifio24
Copy link
Member

@Carifio24 Carifio24 commented Aug 21, 2025

This is perhaps a bit of an edge case, but currently if there's a "flat" dimension in a dataset (i.e., the shape at that index is 1) that's not the x/y (and z if you're in the volume viewer) attribute, then you'll get a slice widget with no slider (since then high=0 and the usual set of buttons that then don't do anything. See the screenshot below.

This looks/feels kinda janky (I thought the slider was broken until I realized that the dataset I was looking at was "flat"), so what I propose here is that we just put in None in the list of sliders for that dimension - i.e. don't show a slider.

A quick sample dataset if one wants to reproduce this (run in the glue terminal):

from glue.core import Data
import numpy as np

x = np.arange(24).reshape((6, 4, 1))
d = Data(x=x, label="Flat Cube")
dc.append(d)

What this currently looks like:
Screenshot 2025-08-21 at 3 42 52 PM

@Carifio24 Carifio24 added the bug Something isn't working label Aug 21, 2025
Copy link
Contributor

@dhomeier dhomeier left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks sensible to me.

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

Successfully merging this pull request may close these issues.

2 participants