matlab和matplot绘图对比

matplot的图和matlab的短时傅里叶的图,数据和算法的参数都一样,是算法给的结果有差异还是绘图有差异?matlab看的细节明显多了,是用法不对还是matlab画图真的好这么多?

matlab:
spectrogram(d3,1024,900,1024,25000,'yaxis');

python:
fs=25000
nfft=1024
overlap=900
cmap = plt.get_cmap('rainbow')
win0 = signal.get_window('hamming', nfft)
f, t, Sxx = signal.spectrogram(x, fs, win0, nfft, overlap)
plt.pcolormesh(t, f, Sxx * 1000, cmap=cmap)

matlab
matlab和matplot绘图对比_第1张图片
python+scipy+matplot
matlab和matplot绘图对比_第2张图片

你可能感兴趣的:(算法)