matplotlib相关问题
matplotlib无法显示中文
import matplotlib as mpl
mpl.rcParams['font.sans-serif'] = ['KaiTi']
mpl.rcParams['font.serif'] = ['KaiTi']
matplotlib绘制子图
ax1 = plt.subplot(211) ax1.plot(f1[limit_lower : limit_upper],y1[limit_lower:limit_upper], color="r") ax1.set_title('FFT spectrum') ax2 = plt.subplot(212) ax2.plot(f2[limit_lower : limit_upper],y2[limit_lower:limit_upper]) ax2.set_title('PSD spectrum')
plt.tight_layout(2)