Skip to content

Conversation

@K-Meech
Copy link
Contributor

@K-Meech K-Meech commented Oct 29, 2025

Closes #313

Showing a HistogramWidget, then selecting an invalid layer type (e.g. Labels / Points / Shape...) was throwing object has no attribute rgb error. This was due to the bin number reset happening on every new layer selection (rather than just the valid ones).

This small fix should ensure this only happens for Image layers. I also added a corresponding test.

@samcunliffe
Copy link
Collaborator

Warrants a new bugfix release.

@samcunliffe samcunliffe added the Bug Something isn't working label Oct 29, 2025
@samcunliffe samcunliffe merged commit a922dd6 into matplotlib:main Oct 30, 2025
13 checks passed
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.

Labels object has no attribute rgb error

2 participants