All Questions
1
question
0
votes
0
answers
105
views
How to plot legends for all (only 4) types of value in a 2D array using matplotlib?
I have a 2-D array where each value is either of 0,1,2,3 and I am plotting it like:
array = two_d_array #two_d_array is a numpy 2-D array
plt.imshow(array)
This gives me a plot where each pixel is ...