I use the following program to read an image file using matplotlib and plotting it. However, I do not want the colour scale to be in linear scale, but want to plot it in logarithmic scale. Can anyone please help me in solving this.
import matplotlib.pyplot as plt
import matplotlib.image as mpimg
import numpy as np
tiff_file = mpimg.imread('D:/image/data_001.tif')
lum_img = tiff_file[:,:,0]
imarray = np.array(tiff_file)
imgplot = plt.imshow(lum_img, cmap='spectral')
plt.colorbar()
Thanks.