Commit 1992d796 authored by Moreau Nicolas's avatar Moreau Nicolas
Browse files

Displays masked area (nan values) in white in png image

parent d15edd67
......@@ -691,9 +691,11 @@ class DataBlock:
# creates a mask where value are nan, typically for non square images
masked_img_i = np.ma.masked_where(np.isnan(img_i),img_i)
cmap = plt.get_cmap(palette)
cmap.set_bad(color='white')
if vmin is not None and vmax is not None:
plt.imshow(masked_img_i, cmap=palette, aspect="equal", interpolation="none", vmin=vmin, vmax=vmax)
plt.imshow(masked_img_i, cmap=cmap, aspect="equal", interpolation="none", vmin=vmin, vmax=vmax)
else :
plt.imshow(masked_img_i, aspect="equal", interpolation="none", cmap=palette)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment