Repository navigation
Bivar colorbar - #32606
Draft
trygvrad wants to merge 2 commits into
Draft
Bivar colorbar#32606trygvrad wants to merge 2 commits into
trygvrad wants to merge 2 commits into
Conversation
- Colorizer: an existing MultiNorm passed as *norm* is used as is instead of being wrapped in a new MultiNorm, which raised a ValueError. - MultiNorm.autoscale_None only emits the 'changed' signal when the limits of a constituent norm actually changed. - Colorbar.remove no longer fails when the mappable has no Axes. Changes implemented with the assistance of AI and manually evaluated Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Add `Figure.colorbar_bivar` and `pyplot.colorbar_bivar`, which draw the colorbar of a bivariate colormap as a 2D image, with one data variable along each axis. The new `BivarColorbar` class lives in the new module `matplotlib.colorbar_multivariate`. Its Axes is created by the existing `colorbar.make_axes` / `colorbar.make_axes_gridspec`, so it takes part in layout (including constrained layout) like a regular colorbar, and `colorbar.py` itself is not changed. Changes implemented with the assistance of AI and manually evaluated Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Nov 15, 2026
Draft
Contributor
Author
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR has a long history. It is part of Bivariate and Multivariate Colormapping and contains changes that were previously part of #31214 which is being separated into multiple parts with the use of AI. This is part 2 of 4 and Depends on #32605. Only the last commit ("Add bivariate colorbars") is new in this PR.
PR summary
Figure.colorbar_bivar/SubFigure.colorbar_bivarandpyplot.colorbar_bivar.matplotlib.colorbar_multivariatewithBivarColorbar,make_bivar_axes,make_bivar_axes_gridspec.colorbar.pyis not changed (see discussion in Multivar colorbar #31214). The colorbar Axes is created by the existingcolorbar.make_axes/make_axes_gridspec(with aspect=1 and no orientation), so placement, gridspec and constrained layout behave as for a normal colorbar.set_xlabel/set_ylabel,xaxis/yaxis,update_normals, remove. No alpha.BivarColorbarcompensates).Figure.colorbarnow raises a clear error when given a bivariate colormap, pointing tocolorbar_bivar.ax._colorbarhas an orientation (backend_bases.py).set_ylabel).test_colorbar_multivariate.py; baseline images moved from Multivar colorbar #31214 unchanged.doc/release/next_whats_new/colorbar_bivar.rst; new API pagecolorbar_multivariate_api.rst.There is no example in the docs yet, that will come in a separate PR.
Here is an example:
AI Disclosure
The split of #31214 into smaller PRs, and the changes requested in review there, were
made with the assistance of an AI coding assistant (Claude). All changes were reviewed
and tested by me.
PR quality check