When matplotlib is in
imshow, if it receives a two-dimensional matrix, it will automatically normalize it and map it to color. If the values in the input matrix are all the same, normalization will change them all to
255, which is black. I tried to use normal distribution to assign values, or only one is
0 and the others are
255, which can be displayed normally.
After expanding the array to a 3-channel graph,
temp = np.expand_dims(img_area_list[j],axis=2).repeat(3,axis=2) axes[j].imshow(temp)