You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
NaN values appear nearly black with fire on Matplotlib 3.11 #848
Consequently, on initial construction with Matplotlib 3.11.2, UltraPlot's call to _set_extremes() does not populate the special-color entries.
Those entries retain the initial np.ones values, including alpha = 1, and are then converted from HSL to RGB, producing an opaque, nearly black color.
The colormap's _rgba_bad is still (0, 0, 0, 0), but get_bad() returns an opaque, nearly black color.
In a process-local comparison, replacing only Matplotlib's _set_extremes() implementation with the one from 3.10.9 restored transparent NaN colors.
Edited: corrected both source-code links and added the version comparison above. The original line anchors pointed to unrelated code.
Workaround
Setting the bad color after initialization restores transparency. This was verified through rendering:
Related: #831, but this concerns NaN transparency rather than colormap lookup.
I searched existing open and closed issues and pull requests and did not find a matching report.
Activity
cvanelteren commentedon Oct 19, 2026
@munechika-koyo the link to the code is pointing to
__eq__which seems to be not related. Do you know what changed in mpl versions?munechika-koyo commentedon Oct 20, 2026
@cvanelteren, I am sorry. I fixed the link to the correct one.
cvanelteren commentedon Oct 20, 2026
No worries fix is already on the listed PR