Logarithmic yscale in imshow [duplicate]

社会主义新天地 提交于 2019-12-18 05:04:46

问题


Possible Duplicate:
Plot logarithmic axes with matplotlib in python

I have a 50*1050 matrix in which the dimension 50 represents the frequency and 1050 the time. I tried to plot it using imshow and I get this image:

But i want to highlight the lower frequencies, which means I need to use the logarithmic scale for the y scale. I searched a lot but I didn't find any effective solution yet.

What I need exactly is that the first row of the matrix should occupy the biggest percentage of the image and as the rows increase, the width if the row they occupy in the image should decrease. Any suggestion?


回答1:


Update the axis:

a = list(axis())
a[3] = 10
axis(a)
yscale('log')


来源:https://stackoverflow.com/questions/13478460/logarithmic-yscale-in-imshow

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!