Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork8.1k
Update Colorizer/ColorizingArtist to work with MultiNorm#30511
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Conversation
77bc51a to9044189CompareUh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
9b9aaf3 to525314eComparetrygvrad commentedSep 4, 2025
Thank you for the feedback@QuLogic and apologies for my sloppy mistakes :) |
improved testing for colorizer+multinormApply suggestions from code reviewCo-authored-by: Elliott Sales de Andrade <quantum.analyst@gmail.com>updates based on feedback from@QuLogic
525314e to23fb63cCompareUh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
eb37db8 tod5c43e0Compare
QuLogic left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
As I mentioned on the call, I think this looks okay from a low-level point-of-view, but I am at this point uncertain as to the high-level status. I hope someone more familiar with the current state can confirm.
PS,@trygvrad if you have some time to pop in to the call, it would be good to just re-iterate the current state succinctly, as I'm not sure everyone is up-to-speed right now.
story645 left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Sorry it took so long to get to this.
lib/matplotlib/colorizer.py Outdated
| ifnormand (xx.max()>1orxx.min()<0): | ||
| raiseValueError("Floating point image RGB values " | ||
| "must be in the 0..1 range.") | ||
| "must be in the 0..1 range") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
| "must be in the0..1 range") | |
| "must be in the[0,1] range") |
teenyist nit but I find interval notation clearer
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
FYI: This required a change to an existing testtest_colors.py→test_scalarmappable_nan_to_rgba(bytes) which had a regex for the string '0..1 range'
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
| elifn_components==2: | ||
| raiseValueError("Invalid data entry for multivariate data. The data" | ||
| " must contain complex numbers, or have a first dimension 2," | ||
| " or be of a dtype with 2 fields") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
I'm not following what 2 components means in this context
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
We had a discussion when declaring MultiNorm that we should refer to the different channels/variates as components, so MultiNorm has the propertyn_components which is the number of channels/variates/components.
In the following example it would be 2, because the colormap supports 2 channels, and we provide 2 datasets.
plt.imshow((A, B), cmap='BiOrangeBlue')There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Thanks! Sorry for forgetting this. :/
trygvrad commentedOct 11, 2025
No worries, thank you for getting around to it :) |
Co-authored-by: hannah <story645@gmail.com>
cf9296d to9409d4cCompare
story645 left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Comments but definitely not blocking, will leave unmerged for a day but they can also be addressed on followup. Thanks for all your patience and persistence.
Uh oh!
There was an error while loading.Please reload this page.
| elifn_components==2: | ||
| raiseValueError("Invalid data entry for multivariate data. The data" | ||
| " must contain complex numbers, or have a first dimension 2," | ||
| " or be of a dtype with 2 fields") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Thanks! Sorry for forgetting this. :/
trygvrad commentedOct 29, 2025
@story645 I added the test we discussed, please take a look at the last commit :) |
Uh oh!
There was an error while loading.Please reload this page.
8745b81 to6934853Compare78617c1 intomatplotlib:mainUh oh!
There was an error while loading.Please reload this page.
story645 commentedOct 30, 2025
doc build failures seem to be intersphinx related |
Uh oh!
There was an error while loading.Please reload this page.
EDIT: closes#30511
This PR continues the work of#28658 and#28454,#29876, aiming toclose#14168. (Feature request: Bivariate colormapping)
This PR allows Colorizer and ColorizingArtist to work with
MultiNormandBivarColormapandMultivarColormapi.e. this PR will allow:
Features not included in this PR:
axes.imshow(...),axes.pcolor(...), andaxes.pcolormesh(...)`PR checklist