Skip to content

Update Colorizer/ColorizingArtist to work with MultiNorm#30511

Merged
story645 merged 4 commits intomatplotlib:mainfrom
trygvrad:colorizer-multinorm
Oct 30, 2025
Merged

Update Colorizer/ColorizingArtist to work with MultiNorm#30511
story645 merged 4 commits intomatplotlib:mainfrom
trygvrad:colorizer-multinorm

Conversation

@trygvrad
Copy link
Copy Markdown
Contributor

@trygvrad trygvrad commented Sep 3, 2025

EDIT: closes #30511

This PR continues the work of #28658 and #28454, #29876, aiming to close #14168. (Feature request: Bivariate colormapping)

This PR allows Colorizer and ColorizingArtist to work with MultiNorm and BivarColormap and MultivarColormap

i.e. this PR will allow:

import matplotlib.pyplot as plt
import numpy as np
import matplotlib as mpl
a = np.arange(12).reshape(3,4)
b = np.arange(12).reshape(4,3).T

norm = mpl.colors.Normalize(vmin=0, vmax=11)
col = mpl.colorizer.Colorizer(cmap='BiOrangeBlue', norm=[norm, norm])

plt.imshow(col.to_rgba((a, b)))
image

Features not included in this PR:

  • Exposes the functionality provided by MultiNorm together with BivarColormap and MultivarColormap to the plotting functions axes.imshow(...), axes.pcolor(...), and axes.pcolormesh(...)`
  • fig.colorbar() equivalents for BivarColormap and MultivarColormap
  • Examples in the docs

PR checklist

  • new and changed code is tested

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

Feature request: Bivariate colormapping

3 participants