I'm given an input of 1/0 matrix. And i want to plot it to look like that: example
The thing is that i have to color all the zeros in blue. but when given a matrix of only ones it also turns into blue. is there a way to make the color "stick" with a specific number?
the code i've used:
cmap = ListedColormap(['b', 'g'])
matrix=np.array(matrix,dtype=np.uint8)
plt.imshow(matrix,cmap=cmap)
