【发布时间】:2020-10-13 13:53:32
【问题描述】:
我正在使用 Matplotlib 的 specgram 函数,其形式如下:
Pxx, freqs, bins, im = specgram(x, NFFT=NFFT, Fs=Fs, noverlap=900)
其中Pxx、freqs、bins 和im 表示周期图、频率向量、时间箱中心和 image.AxesImage 实例。此外,您可以输入传递给 imshow 的参数 (**kwargs)。
如果不自动生成绘图,我似乎无法在 Jupyter Notebook 中使用 specgram。我可以向specgram 传递什么参数来阻止它自动绘图?
我没有调用任何plt.show() 命令。我尝试在行尾添加分号,并尝试将最后一个参数 (im) 设置为空,如下所示:
Pxx, freqs, bins, _ = specgram(x, NFFT=NFFT, Fs=Fs, noverlap=900);
但似乎没有任何效果。
【问题讨论】:
-
跟 Julia 有什么关系?
-
我在 Julia 中通过 Jupyter Notebook 使用 Pyplot。
标签: matplotlib plot jupyter-notebook julia spectrogram