import matplotlib.pyplot as plt plt.rc('font',family='Times New Roman') 注意一定要在导入包之后就设置这个代码,否则可能不显示。 参考文献 [1]matplotlib 全局字体改为 Times New Roman