Skip to content

Do not send all kwargs to 1d figure in inspector plot#513

Merged
nvaytet merged 5 commits intomainfrom
inspector-fixes
Jan 22, 2026
Merged

Do not send all kwargs to 1d figure in inspector plot#513
nvaytet merged 5 commits intomainfrom
inspector-fixes

Conversation

@nvaytet
Copy link
Member

@nvaytet nvaytet commented Jan 22, 2026

Fixes #510

@damskii9992 can you double-check this is now behaving as you expect it to?

@damskii9992
Copy link

Fixes #510

@damskii9992 can you double-check this is now behaving as you expect it to?

I don't even get a plot now. Hmm.

@damskii9992
Copy link

Fixes #510

@damskii9992 can you double-check this is now behaving as you expect it to?

Okay, I got it working. It works the way I thought from reading your code changes, but not how I'd personally like it to 😓
Setting the ymin and ymax of the 2D plot seems useless to me ( at least in imaging) and especially since you can't set the xmin and xmax. . .
The way I would've preferred it to work, is by ymin and ymax only setting the boundaries on the 1D plot, so the plot isn't totally skewed if you have a few outlier points.

@nvaytet
Copy link
Member Author

nvaytet commented Jan 22, 2026

especially since you can't set the xmin and xmax. . .

You actually can actually set xmin and xmax, but I badly listed the arguments in the function signature (it is sent further via the kwargs).

I agree that setting the ymin/ymax on the 1d figure would be more useful.
I guess for consistency, setting the xmin/xmax on the 1d figure should also be possible, right?

@damskii9992
Copy link

I guess for consistency, setting the xmin/xmax on the 1d figure should also be possible, right?

Yeah, that'd make sense, at least to me :)

@nvaytet
Copy link
Member Author

nvaytet commented Jan 22, 2026

I will leave the logx and logy args out though, as I think they are a little more ambiguous as to which plot they would apply to.
In imaging, it would be clear, as you rarely want log scales on your images, but for other kind of plots, it's not so obvious.

@nvaytet
Copy link
Member Author

nvaytet commented Jan 22, 2026

Last question: if you use logc=True (or norm="log"), would you expect this to apply to only the 2d image or both 2d and 1d figure?
They are sort of representing the same scale, but the values in the 2d image have been summed along the 3rd dimension, and may be much higher than the values in the 1d plot.

Note that this is just for the initial way the plot looks. Controlling the log scale independently on the 2 plots is still possible after plot creation via the toolbar buttons.

@damskii9992
Copy link

Last question: if you use logc=True (or norm="log"), would you expect this to apply to only the 2d image or both 2d and 1d figure? They are sort of representing the same scale, but the values in the 2d image have been summed along the 3rd dimension, and may be much higher than the values in the 1d plot.

Note that this is just for the initial way the plot looks. Controlling the log scale independently on the 2 plots is still possible after plot creation via the toolbar buttons.

Hmm, considering that cmax, and other things interacting with the colorscale in the 2D image, doesn't affect the 1D image, I would expect the same to hold for the logc. And I also think this makes the most sense, especially since, as you say, the values might be completely different depending on the reduction operation used.

@nvaytet
Copy link
Member Author

nvaytet commented Jan 22, 2026

I also think log norm should only apply to the 2d plot 👍
(this is currently how it is implemented)

@nvaytet nvaytet merged commit d6fc179 into main Jan 22, 2026
4 checks passed
@nvaytet nvaytet deleted the inspector-fixes branch January 22, 2026 16:35
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 this pull request may close these issues.

Inspector 'ymax' and 'ymin' wrongfully set ymax and ymin for both figures

2 participants