I have a 2d numpy array obtained by reading from an image. The unique values of the array are 0, 1, and 2. I want to plot the image showing unique colors red, green, and blue for the values 0,1, and 2 respectively.
plt.imshow(data, cmap=colors.ListedColormap(['red'])
How would you do it?