python - imshow 中的对数 yscale

标签 python matplotlib logarithm

<分区>

Possible Duplicate:
Plot logarithmic axes with matplotlib in python

我有一个 50*1050 矩阵,其中维度 50 表示频率,维度 1050 表示时间。我尝试使用 imshow 绘制它,我得到了这张图片:

http://ge.tt/26MVT0S/v/0?c

但我想突出显示较低的频率,这意味着我需要使用对数标度作为 y 标度。我搜索了很多,但我还没有找到任何有效的解决方案。

我真正需要的是矩阵的第一行应该占据图像的最大百分比,并且随着行的增加,如果它们在图像中占据的行的宽度应该减小。有什么建议吗?

最佳答案

更新坐标轴:

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

关于python - imshow 中的对数 yscale,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13478460/

相关文章:

python - 使用 pyodbc 模块的连接字符串不适用于 Enthought Python Distribution

python - sklearn.exceptions.NotFittedError : Estimator not fitted, 在利用模型之前调用 `fit`

python - plot.subplot ---> 'Figure' 对象没有属性 'plot'

python - 如何在Python中检测函数最末端的峰值?

c - 稳健准确地计算两个 float 商的自然对数

python - 使用 sklearn 接口(interface)包裹模型

python 导入 pymongo 失败

python - Python 中的多色散点图图例

audio - 是否有使用频率对数除法的 FFT?

python - 你如何在 Python 中使用 numpy 处理自然日志(例如 "ln()")?