I have a matrix (image_spectrogram) which representing a image.
Using the imagesc function, I can shown the image.
eg: imagesc(x,y,log10(image_spectrogram+1));
I am trying to set the y axis to log scale, so I typed:
set(gca,'YScale','log','YDir','normal','YTick',[0.1,100,500,1000,5000]);
However, it turns out that this is a fake log scale.
The YScale did turn into log scale, but the image is absolutely identical to the linear one.
Two images are attached as following.
How to get a real log scale (y axis) image, please help me! This is the linear image:
This is the Y axis log scale image:
They are same except the fake log scale Y axis.
My original code is :
imagesc(x,y,log10(image_spectrogram(1:floor(Fs/2),:)+1)); cmap = colormap('gray'); colormap(flipud(cmap)); caxis(log10([0.9,max(image_spectrogram(:))*0.2])); set(gca,'YScale','log','YDir','normal','YTick',[0.1,100,500,1000,5000]);
Help!
Best Answer