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
Ouch, this is definitely a bug in the code I wrote - that's terrible 😭
Probably related to matplotlib/matplotlib/pull/10220, where I'm looking at clipping instead of wrapping colours from the other side. (not as in code overlap or causing a bug, but dealing with similar logic)
Fixing this issue may be as simple as setting alpha to 255 instead of 1 for integer dtypes, or it might be more involved. Either way I'll try to open a pull within the next few days.
Code Sample, a copy-pastable example if possible
Problem description
In #1796, @Zac-HD added support for RGBA images. If an alpha channel is not found, it is added (code)
The problem is that adding this alpha channel requires the images to be normalized to 0-1, while plotting an image in 0-255 range without alpha channel works fine in matplotlib. Removing https://github.com/pydata/xarray/blob/master/xarray/plot/plot.py#L708-L715 would solve the problem, but I guess it was added for a reason.
@Zac-HD , thoughts?
The text was updated successfully, but these errors were encountered: