matplotlib无法显示中文和符号的解决办法
import matplotlib.pyplot as plt
plt.rcParams[‘font.sans-serif’] = [‘SimHei’] #显示中文
plt.rcParams[‘axes.unicode_minus’]=False #用来正常显示负号
绘图未完全显示
https://matplotlib.org/tutorials/intermediate/tight_layout_guide.html
matplotlib官网关于tight_layout()使用说明
tight_layout用于自动调整子图参数,使子图适合图形区域。因为在matplotlib中,轴标签可能会超出图形区域,从而被裁剪
为了避免这种情况,matplotlib引入一个新的命令tight_layout(),自动来调整,在show前加上
plt.tight_layout()