【发布时间】:2015-03-29 04:22:45
【问题描述】:
我正在使用以下代码绘制specgram:
fig = plt.figure(figsize=(5.15, 5.15))
fig.clf()
plot = plt.subplot(111)
plt.specgram(data, NFFT = 256, Fs = 120000)
plot.grid(False, which="major")
plot.set_xlabel(r'\textit{Time (s)}', labelpad=6)
plot.set_ylabel(r'\textit{{Frequency (Hz)}}', labelpad=6)
plt.colorbar()
fig.savefig('specgram.pdf', bbox_inches='tight')
plt.close()
但是specgram并没有填满整个图形区域,如下图:
我可能做错了什么?
【问题讨论】:
标签: python matplotlib