Skip to content Skip to sidebar Skip to footer

Python Imshow Grayscale Static Color Values

I understand using matplotlib.pyplot's imshow gives me a nice sketch that can be used to visualize matrices. My question is that when I want to visualize a matrix, the function adj

Solution 1:

You can use the vmin and vmax keyword arguments of imshow as documented here. In particular, if you modify your imshow call to

plt.imshow(k, vmin=0, vmax=1)

the colours will be normalised as if there was a value 0 and a value 1 present in the data.


Post a Comment for "Python Imshow Grayscale Static Color Values"